2.1.3 • Published 6 years ago

bn2 v2.1.3

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

A Bignumber.js Wrapper

Usage

import BN from 'bn2'

console.log(new BN().toNumber())
// >> 0

/* toFormat
new ('123456.780').toFormat() >> 123,456.78
new ('123456.780').toFormat('fixed') >> 123,456.780
new ('123456.78').toFormat(1, 'fixed') >> 123,456.7
new ('123456.710').toFormat(1, BN.ROUND_UP, 'fixed') >> 123456.8
*/

Webpack babel-loader conf

module.exports = {
	// ...
  module: {
  	// ...
    rules: [
  		// ...
      {
        test: /\.js$/,
        loader: 'babel-loader',
        include: function(modulePath) {
          const _path = modulePath.replace(process.cwd() + '/', '')
          const _module = _path.replace('node_modules/', '')
          return /^(src|test)/.test(_path) || /^(bn2|webpack-dev-server\/client)/.test(_module)
        }
      },
	// ...
}
2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago