Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evan-moon/simple-number-suffix
module that adds a suffix by rounding down the number.
https://github.com/evan-moon/simple-number-suffix
Last synced: about 1 month ago
JSON representation
module that adds a suffix by rounding down the number.
- Host: GitHub
- URL: https://github.com/evan-moon/simple-number-suffix
- Owner: evan-moon
- License: mit
- Created: 2017-03-28T06:36:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-01T10:49:31.000Z (about 6 years ago)
- Last Synced: 2024-04-25T21:04:32.081Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[npm-image]: https://img.shields.io/npm/v/simple-number-suffix.svg
[npm-url]: https://www.npmjs.com/package/simple-number-suffix# simple-number-suffix [![npm][npm-image]][npm-url]
module that adds a suffix by rounding down the number.## Installation
```shell
npm install simple-number-suffix
```## Usage (with CommonJS)
```javascript
const filter = require('simple-number-suffix');filter(999); // 999
filter(1234); // 1k
filter(1002928); // 1M
filter(2249284291); // 2G
filter(Number.MAX_SAFE_INTEGER); // 9P
```