Skip to content

Releases: Edditoria/numbo

v3.0.0-rc.0

14 Nov 06:18
Compare
Choose a tag to compare
v3.0.0-rc.0 Pre-release
Pre-release

Upcoming v3

All languages and utilities are ES modules. They can be import separately. For example, if you only need Simplified Chinese, just import zhCN from 'numbo/zh-cn' // function.

In v3, I would still write in Coffeescript. The code will be compiled to ESM using Gulp and be compiled to UMD "bundles" using Rollup. I'm not sure someone need it, but I may support CommonJS in future.

Same as before, there is no dependency to use Numbo for your project. You only need to install the "devDependencies" when you clone it and change things.

You can experience this version using npm install numbo@next.

Breaking Changes v2 ➡️ v3

  1. Node's Conditional Exports is good, but there will be more than 2 approaches on 12+, < 12, and build-tools.
  2. Numbo is now a class. Please add var numbo = new Numbo();.
  3. Numbo take 1 object as options { type: 'amount' } rather than numbo(input, some, options).
  4. I'm considering to do less checking on input and options. Please do your own tests especially on possible errors, in all coming v3.x versions.
  5. Tools are named "utils" now.
  6. All langs and utils can be import as they are ES modules, as requested.