Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
approximate-number
Advanced tools
Converts numbers into a more human-friendly format. For example, 123456 becomes '123k'.
Converts numbers into a more human-friendly format, similar to ls
's --human-readable
flag (ls -lh
) or Stack
Overflow's reputation numbers. For example, 123456 becomes '123k'.
Works in Node, browsers, and on the command line.
Install node module with: npm install approximate-number
var approx = require('approximate-number');
approx(123456) // 123k
Or use the browser module with: bower install approximate-number
<script src="/bower_components/approximate-number/lib/approximate-number.js"></script>
<script>
alert(approximateNumber(1234567890)); // 1.2b
</script>
Or install with -g
for command line usage
$ npm install -g approximate-number
$ approximate-number 78910 #78k
See tests for more examples.
Copyright (c) 2014 Nathan Friedly
Licensed under the MIT license.
FAQs
Converts numbers into a more human-friendly format, similar to `ls`'s `--human-readable` flag (`ls -lh`) or Stack Overflow's reputation numbers. For example, 123456 becomes '123k'.
The npm package approximate-number receives a total of 3,437 weekly downloads. As such, approximate-number popularity was classified as popular.
We found that approximate-number demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.