-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
170 changed files
with
3,432 additions
and
1,140 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"_id":"@defi.org/chai-bignumber","_rev":"1-9af60141bcce898b128d4688f73a95f8","name":"@defi.org/chai-bignumber","dist-tags":{"latest":"3.0.2"},"versions":{"3.0.1":{"name":"@defi.org/chai-bignumber","version":"3.0.1","description":"Chai assertions for comparing arbitrary-precision decimals using the bignumber.js library","main":"./dist/chai-bignumber.js","types":"./dist/chai-bignumber.d.ts","author":{"name":"[email protected]"},"license":"MIT","homepage":"https://github.com/defi-org-code/chai-bignumber","repository":{"type":"git","url":"git://github.com/defi-org-code/chai-bignumber.git"},"keywords":["chai","chai-plugin","math","browser","test","arbitrary","precision","arithmetic","big","number","decimal","float","bignumber"],"peerDependencies":{"bignumber.js":"*"},"devDependencies":{"bignumber.js":"9.x","@types/chai":"4.x","@types/mocha":"9.x","@types/lodash":"4.x","lodash":"4.x","chai":"4.x","mocha":"10.x","prettier":"2.x","typescript":"4.x","ts-node":"10.x"},"scripts":{"test":"env mocha -r ts-node/register 'test/**/*.ts'","build":"tsc"},"prettier":{"printWidth":180},"gitHead":"5c2d11c990d422cd5c5d07f1c1f6303d939f7963","bugs":{"url":"https://github.com/defi-org-code/chai-bignumber/issues"},"_id":"@defi.org/[email protected]","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-TkkfT//7H7zwq56ZUlPrTrWtgRNZpIu7N43jCosz0H4YGGkoeCCvLGaD3nJJXTVXuyTRfrOXv2M/Mca/UOCWww==","shasum":"4e38a93d0b43b250daccc341998320b3511c41f0","tarball":"https://registry.npmjs.org/@defi.org/chai-bignumber/-/chai-bignumber-3.0.1.tgz","fileCount":3,"unpackedSize":5441,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHqx6bC65AkHx7NBnISVHU3AzvcgxAbC9gkyS9boA1SQIhAL8m8vGzuqFCI4ys9H974x/pD/NZ2SW6tKf1paiPjE2v"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLJbUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSTw/+JvLlgJ/j80jr0q+gjinkISr54xPr5VCXcF83O4TWzMkIb7fi\r\nPKC2nd9kprHKTUsEXWGw4Eg1XUon/P3U2QQ77LDpkr63Qio68P2wSIc8iz/S\r\nvcpUl5a9VtZK3Z+I7u9jcJPUdpcxV0xTIF8V+3mETDmAblAcxx2a1ZA22ksT\r\n1K2472UO6F26CqJkdjjzPHy+SCferY9DcGPNEoBRMHM1m9LXxqlxBVFysLom\r\nAz61ksC1ZN0idkIlHfou73t9P/2s2JCD93itVx4Vvn1duKmsX0bjUNFUmE26\r\n4+IM5maRjpVrZ+r+inPYNfi5STzXGTRnuEOwU6G3hmry6g+puZ64I+wVBstv\r\nElc8wWWP4FKmPkSZMfOp7vVLphAZxn7HmZcT1ilTh76PEf2t0gzJe0QRemJt\r\nMzpyk/XuzUKcE7/I64swQHnsOwHHEVhoZ014HmS2BYg2iB2XyUfNwwefeTwX\r\ngj66AuEe3UiM0OZfoGgRFaRuoWK5rGUsbrY4fqnvPSpEmm+dvuAxUes3TBgW\r\nRwGC2cxxhHC14V/AAyBX3MkhANJwC1lwJQtb/1dnpkRyU+c5jCZnki4uHHYF\r\nsB/eJHHrmrA8oIsg80o0T2qLQiHx6OYR72iXxVM2ZxwIn7MTeZbXhIdKQUBu\r\nbQYoT5OR5sFtQ+fDwGKGsZujxjQOXjZC3Ec=\r\n=F7oN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"zlotindaniel","email":"[email protected]"},"directories":{},"maintainers":[{"name":"idana","email":"[email protected]"},{"name":"doronaviguy","email":"[email protected]"},{"name":"amihaz","email":"[email protected]"},{"name":"uvorbs","email":"[email protected]"},{"name":"talkol","email":"[email protected]"},{"name":"zlotindaniel","email":"[email protected]"},{"name":"rotemy","email":"[email protected]"},{"name":"ronno","email":"[email protected]"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chai-bignumber_3.0.1_1663866580281_0.6780810118133425"},"_hasShrinkwrap":false},"3.0.2":{"name":"@defi.org/chai-bignumber","version":"3.0.2","description":"Chai assertions for comparing arbitrary-precision decimals using the bignumber.js library","main":"./dist/chai-bignumber.js","types":"./dist/chai-bignumber.d.ts","author":{"name":"[email protected]"},"license":"MIT","homepage":"https://github.com/defi-org-code/chai-bignumber","repository":{"type":"git","url":"git://github.com/defi-org-code/chai-bignumber.git"},"keywords":["chai","chai-plugin","math","browser","test","arbitrary","precision","arithmetic","big","number","decimal","float","bignumber"],"peerDependencies":{"bignumber.js":"*"},"devDependencies":{"bignumber.js":"9.x","@types/chai":"4.x","@types/mocha":"9.x","@types/lodash":"4.x","lodash":"4.x","chai":"4.x","mocha":"10.x","prettier":"2.x","typescript":"4.x","ts-node":"10.x"},"scripts":{"test":"env mocha -r ts-node/register 'test/**/*.ts'","build":"tsc"},"prettier":{"printWidth":180},"gitHead":"1fe5d83ad3a0f8a49d2f800c496e0e660a167f2a","bugs":{"url":"https://github.com/defi-org-code/chai-bignumber/issues"},"_id":"@defi.org/[email protected]","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-zu0LUJUZrSE30isl91K7NoTSxe6EUtFrLiiTtEoUkCrowRjeUw+U3lg4Vs5WNmc2QurZvHrVPbGRF+9S9Tu8Kw==","shasum":"d4221a0d85214a0d56d29df4d588349f77e50bd6","tarball":"https://registry.npmjs.org/@defi.org/chai-bignumber/-/chai-bignumber-3.0.2.tgz","fileCount":5,"unpackedSize":11234,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHdSgDpX1WqOuMg0nRQ5x98rxSjWjeHbCkK51f+YpMVmAiAsIBdr9nXT15H1OASX1TTuRluf7gqGtLBpIin9rqScQg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLKXjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokFw//TMF31OEc2f7nRD+UhVMUcvKlGFusP2lFwZo7L8VSOahgTmRE\r\nb/Y8SiZtsyCqzv/6Fiag9hO8cy/2JEMer/XL/f5iytXSOw7Fnzl5133MZK0X\r\n9v1i5NKQHFlOPAp11xO4F2mzLQZefS4+MRU5BGW3D2nNVSITvaej1vMtd0f1\r\nVLUWRgLFMkkDcC5Xvzra8tZPYBfJ54VOXSx8bJw5D66dnbW+h+2D6rQWH1EI\r\n/kvUvhRzZcKtxJThRRYbeyiJYDeS9rUDKnbR62L//mDGQ7I8GOhELZx6L6tN\r\nqXm+GojBA3sqWuIFbKs9+LI/2TTI1hnl8NTMw0wYYYWtSCNNGG6luvpu8GzT\r\nzR/Z9s9UxejTJ/Pz7NtERiY7IStrB/duyZCmAydnIjODY9hwVdAccewG+Djh\r\n3bQMMkiz20nIn+AgVdHpL00vyQClwosqJmJ8YEYQ63DBA8VntG1OGmcq5TB6\r\nJ7v4z7cx0hJxTsumEJ8U2vMnxBinCdVw1zvaI5Xa3p7534Wc5BDP4AN7/ySl\r\n6uRHE2c0HO5YFILkBlLvrFCeNfcP7H1ZpYtDQPYCjcKpAKj4/V/k81edvgpV\r\n6pq78R7f8WZe/W0pUE0njxG7mlC9LRJoLCvUHHjT7UxicfpThXHKIbLq1OOR\r\nE0qC6l1Q0RL8wX5FESqqfx8UA+6btkDVTC0=\r\n=pt4D\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"zlotindaniel","email":"[email protected]"},"directories":{},"maintainers":[{"name":"idana","email":"[email protected]"},{"name":"doronaviguy","email":"[email protected]"},{"name":"amihaz","email":"[email protected]"},{"name":"uvorbs","email":"[email protected]"},{"name":"talkol","email":"[email protected]"},{"name":"zlotindaniel","email":"[email protected]"},{"name":"rotemy","email":"[email protected]"},{"name":"ronno","email":"[email protected]"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chai-bignumber_3.0.2_1663870435672_0.2833330748917722"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-22T17:09:40.202Z","3.0.1":"2022-09-22T17:09:40.407Z","modified":"2022-09-22T18:13:56.094Z","3.0.2":"2022-09-22T18:13:55.890Z"},"maintainers":[{"name":"idana","email":"[email protected]"},{"name":"doronaviguy","email":"[email protected]"},{"name":"amihaz","email":"[email protected]"},{"name":"uvorbs","email":"[email protected]"},{"name":"talkol","email":"[email protected]"},{"name":"zlotindaniel","email":"[email protected]"},{"name":"rotemy","email":"[email protected]"},{"name":"ronno","email":"[email protected]"}],"description":"Chai assertions for comparing arbitrary-precision decimals using the bignumber.js library","homepage":"https://github.com/defi-org-code/chai-bignumber","keywords":["chai","chai-plugin","math","browser","test","arbitrary","precision","arithmetic","big","number","decimal","float","bignumber"],"repository":{"type":"git","url":"git://github.com/defi-org-code/chai-bignumber.git"},"author":{"name":"[email protected]"},"bugs":{"url":"https://github.com/defi-org-code/chai-bignumber/issues"},"license":"MIT","readme":"# chai-bignumber\n\n\n\nChai assertions for comparing arbitrary-precision decimals using the [bignumber.js](https://github.com/MikeMcl/bignumber.js) library.\n\n## Installation\n\n```bash\nnpm install --save-dev chai-bignumber\n```\n\n## Usage\n\n```javascript\nvar chai = require('chai');\n\n//use default BigNumber\nchai.use(require('chai-bignumber')());\n\n//use custom BigNumber\nchai.use(require('chai-bignumber')(BigNumber));\n```\n\n## Assertions\n\nThe following assertion methods are provided and will override the existing\nbuiltin assertions if the `bignumber` property is explicitly set as part of\nthe assertion chain:\n- equal/equals/eq\n- above/gt/greaterThan\n- least/gte\n- below/lt/lessThan\n- most/lte\n\nThe above methods have the following signature: `(value, dp, rm)`.\nWhere `dp` is an optional argument which specifies the number of decimal places\nto round each side of the comparison to (values are not rounded by default),\nwhile `rm` is an optional argument which specifies the\n[rounding mode](https://mikemcl.github.io/bignumber.js/#constructor-properties)\nas supported by `bignumber.js` (defaults to `BigNumber.ROUND_HALF_UP`).\n\nA set of additional assertion properties is also provided:\n- finite\n- integer\n- negative\n- zero\n\nValues can be instances of `number`, `BigNumber` or `string` which can be\nconverted into a valid number. Only BDD style (`expect` or `should`) assertions\nare supported.\n\n## Examples\n\nMethods:\n\n```javascript\nvar result = new BigNumber('100000000000000000').plus(1);\nvar expected = '100000000000000001';\nresult.should.be.bignumber.equal(expected);\nexpect(result).to.be.bignumber.at.most(expected);\n'1000'.should.be.bignumber.lessThan(2000);\n```\n\nMethods with rounding:\n\n```javascript\nvar BigNumber = require('bignumber.js');\n(100.343).should.be.bignumber.equal(100.341, 2);\n(100.349).should.be.bignumber.equal(100.341, 2, BigNumber.ROUND_DOWN);\n```\n\nProperties:\n\n```javascript\n(100 / 0).should.not.be.finite;\nexpect(10).to.be.integer;\n(-100).should.be.negative;\nexpect(1 - 1).to.be.zero;\n```\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"} |
Oops, something went wrong.