🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

humanizer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

humanizer - npm Package Compare versions

Comparing version
0.1.0
to
0.1.1
+9
-2
Humanize.js

@@ -1,2 +0,4 @@

var _ = require('lodash');
(function(){
var isSSJS = 'undefined' !== typeof module && module.exports;
var _ = isSSJS ? require('lodash') : _;

@@ -110,2 +112,7 @@ function Humanize(baseUnitName, baseUnit){

module.exports = Humanize;
if (isSSJS) {
module.exports = Humanize;
} else {
this.Humanize = Humanize;
}
}());
+6
-3
{
"name": "humanizer",
"version": "0.1.0",
"version": "0.1.1",
"description": "Humanize a value.",

@@ -11,7 +11,10 @@ "main": "humanize.js",

"type": "git",
"url": "git://github.com/FGRibreau/humanize.git"
"url": "git://github.com/FGRibreau/humanizer.git"
},
"keywords": [
"humanize",
"value"
"tool",
"unit",
"browser",
"nodejs"
],

@@ -18,0 +21,0 @@ "author": "Francois-Guillaume Ribreau <npm@fgribreau.com> (http://fgribreau.com)",

@@ -1,7 +0,9 @@

Humanize [![Build Status](https://drone.io/github.com/FGRibreau/humanize/status.png)](https://drone.io/github.com/FGRibreau/humanize/latest)
Humanizer [![Build Status](https://drone.io/github.com/FGRibreau/humanizer/status.png)](https://drone.io/github.com/FGRibreau/humanizer/latest)
========
Humanize a value. `Humanize` provides "ago" libraries-like capabilities and so on...
In fact, unlike other libraries, `humanize` can work with any type of unit and with any scale.
Humanizer a value. `Humanizer` provides "ago" libraries-like capabilities and so on...
In fact, unlike other libraries, `humanizer` can work with any type of unit at any scale.
Humanizer is tested against browsers and NodeJS.
```bash

@@ -11,7 +13,8 @@ npm install humanizer

```javascript
var time = require('humanizer');
var Humanizer = require('humanizer');
// Define the time unit
time = new Humanize('ms', 1) // the base unit is 1 `ms`
time = new Humanizer('ms', 1) // the base unit is 1 `ms`
.unit('day', 24*3600*1000)

@@ -18,0 +21,0 @@ .unit('hour', 3600*1000)

var Humanize = require('../Humanize');
var _ = require('lodash');
var time = null;

@@ -4,0 +5,0 @@ module.exports = {