bitcoinjs / bip39

JavaScript implementation of Bitcoin BIP39: Mnemonic code for generating deterministic keys
ISC License
1.11k stars 447 forks source link

String.prototype.normalize support #106

Closed zyuhel closed 5 years ago

zyuhel commented 5 years ago

Doesn't String.prototype.normalize is supported now by most of the browsers? May be unorm dependency should be removed and polyfills should be set by builders script of projects using this library?

junderw commented 5 years ago

Do you have any data on browser support?

xzjcool commented 5 years ago

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize seems only android webview not support. the unorm package is too big

junderw commented 5 years ago

ok, we'll remove it with the typescript major version change coming up

zyuhel commented 5 years ago

Will it be removed for non typescript version as well?

junderw commented 5 years ago

What do you mean non-typescript version?

Typescript is a superset of NodeJS, so if you don't want to use Typescript, just don't pull it into your app.

This is a breaking change, so a major version bump is required.

Next major version will use typescript also.

zyuhel commented 5 years ago

So if i understand correctly new major version will be rewritten in typescript?

p.s. should i close this issue and pr then?

junderw commented 5 years ago

104 has more info. This will be a version bump.

I have removed unorm from it: https://github.com/bitcoinjs/bip39/pull/104/commits/91b0efd9fb9dbf8668708ec8e6aef96d31936c37