Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

human-format

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

human-format - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

dist/human-format.js

4

index.js

@@ -50,3 +50,3 @@ // UMD: https://github.com/umdjs/umd/blob/master/returnExports.js

function escapeRegexp (str) {
return str.replace(/([.*+?=^!:${}()|[\]\/\\])/g, '\\$1')
return str.replace(/([.*+?=^!:${}()|[\]/\\])/g, '\\$1')
}

@@ -154,6 +154,4 @@

var prefixes = {}
var factor = initExp ? Math.pow(base, initExp) : 1
forEach(prefixesList, function (prefix, i) {
prefixes[prefix] = Math.pow(base, i + (initExp || 0))
factor *= base
})

@@ -160,0 +158,0 @@

{
"name": "human-format",
"version": "0.7.0",
"version": "0.8.0",
"description": "Converts a number to/from a human readable string: `1337` ↔ `1.34kB`",

@@ -19,17 +19,26 @@ "keywords": [

"scripts": {
"lint": "standard",
"test": "npm run lint && mocha index.spec.js"
"commitmsg": "yarn test",
"dev-test": "jest --watch",
"prepublish": "mkdir -p dist && browserify -s humanFormat index.js | uglifyjs -c > dist/human-format.js",
"pretest": "standard",
"test": "jest"
},
"repository": {
"type": "git",
"url": "http://github.com/julien-f/human-format"
"url": "http://github.com/JsCommunity/human-format"
},
"bugs": "https://github.com/julien-f/human-format/issues",
"bugs": "https://github.com/JsCommunity/human-format/issues",
"author": "Julien Fontanet <julien.fontanet@isonoe.net> (http://julien.isonoe.net/)",
"license": "ISC",
"devDependencies": {
"chai": "^3.0.0",
"mocha": "^2.2.5",
"standard": "^5.1.0"
}
"browserify": "^14.1.0",
"husky": "^0.13.1",
"jest": "^19.0.2",
"standard": "^9.0.0",
"uglify-js": "^2.8.3"
},
"files": [
"dist/",
"index.js"
]
}
# human-format
[![Build Status](https://img.shields.io/travis/julien-f/human-format/master.svg)](http://travis-ci.org/julien-f/human-format)
[![Dependency Status](https://david-dm.org/julien-f/human-format/status.svg?theme=shields.io)](https://david-dm.org/julien-f/human-format)
[![devDependency Status](https://david-dm.org/julien-f/human-format/dev-status.svg?theme=shields.io)](https://david-dm.org/julien-f/human-format#info=devDependencies)
[![Build Status](https://img.shields.io/travis/JsCommunity/human-format/master.svg)](http://travis-ci.org/JsCommunity/human-format)
[![Dependency Status](https://david-dm.org/JsCommunity/human-format/status.svg?theme=shields.io)](https://david-dm.org/JsCommunity/human-format)
[![devDependency Status](https://david-dm.org/JsCommunity/human-format/dev-status.svg?theme=shields.io)](https://david-dm.org/JsCommunity/human-format#info=devDependencies)

@@ -10,16 +10,24 @@ > Converts a number to/from a human readable string: `1337` ↔ `1.34kB`

## Install
## Installation
Download [manually](https://github.com/julien-f/human-format/releases) or with package-manager.
### Node & [Browserify](http://browserify.org/)/[Webpack](https://webpack.js.org/)
#### [npm](https://npmjs.org/package/human-format)
Installation of the [npm package](https://npmjs.org/package/human-format):
```
npm install --save human-format
> npm install --save human-format
```
#### bower
Then require the package:
```javascript
var humanFormat = require('human-format');
```
bower install --save human-format
### Browser
You can directly use the build provided at [unpkg.com](https://unpkg.com):
```html
<script src="https://unpkg.com/human-format@0.8/dist/human-format.js"></script>
```

@@ -104,3 +112,3 @@

- report any [issue](https://github.com/julien-f/human-format/issues)
- report any [issue](https://github.com/JsCommunity/human-format/issues)
you've encountered;

@@ -107,0 +115,0 @@ - fork and create a pull request.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc