https://github.com/javiercejudo/to-decimal
Ensures a number is represented as a decimal
https://github.com/javiercejudo/to-decimal
Last synced: 2 months ago
JSON representation
Ensures a number is represented as a decimal
- Host: GitHub
- URL: https://github.com/javiercejudo/to-decimal
- Owner: javiercejudo
- License: mit
- Created: 2015-11-17T21:26:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-27T08:44:49.000Z (over 8 years ago)
- Last Synced: 2025-03-14T04:18:08.386Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/to-decimal-arbitrary-precision
- Size: 7.81 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# to-decimal
[](https://travis-ci.org/javiercejudo/to-decimal)
[](https://coveralls.io/r/javiercejudo/to-decimal?branch=master)
[](https://codeclimate.com/github/javiercejudo/to-decimal)Ensures a number is represented as a decimal
## Install
npm i to-decimal-arbitrary-precision
## Usage
```js
var Decimal = require('linear-arbitrary-precision')(require('floating-adapter'));
var toDecimal = require('to-decimal-arbitrary-precision')(Decimal);toDecimal(32); // => new Decimal('32')
```## Related projects
- [linear-presets](https://github.com/javiercejudo/linear-presets): linear presets for common units.
- [linear-converter](https://github.com/javiercejudo/linear-converter): flexible linear converter.