polyfill-number-tolocalestring
2.0.0 • Public • Published polyfill-number-tolocalestring
Polyfill Number.prototype.toLocaleString() with globalize and cldr-data.
install
$ yarn add polyfill-number-tolocalestring
usage
import usePolyfill from 'polyfill-number-tolocalestring'
async function main() {
const reset = await usePolyfill(true)
const num = 1200.01
console.log(num.toLocaleString('nl'))
console.log(num.toLocaleString('nl', {
style: 'currency',
currency: 'EUR',
currencyDisplay: 'code'
}))
reset()
console.log(num.toLocaleString('nl'))
}
main()
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 2.0.0
0
Version History
- VersionDownloads (Last 7 Days)
- 2.0.0
0
Package Sidebar
Install
npm i polyfill-number-tolocalestring
Weekly Downloads