Socket
Socket
Sign inDemoInstall

humanize-duration

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

humanize-duration - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

.hound-ignore

29

humanize-duration.js

@@ -1,8 +0,3 @@

/*
// HumanizeDuration.js - http://git.io/j0HgmQ
HumanizeDuration.js
http://git.io/j0HgmQ
*/
(function() {

@@ -142,2 +137,12 @@

},
sv: {
year: "år",
month: function(c) { return "månad" + ((c !== 1) ? "er" : ""); },
week: function(c) { return "veck" + ((c !== 1) ? "or" : "a"); },
day: function(c) { return "dag" + ((c !== 1) ? "ar" : ""); },
hour: function(c) { return "timm" + ((c !== 1) ? "ar" : "e"); },
minute: function(c) { return "minut" + ((c !== 1) ? "er" : ""); },
second: function(c) { return "sekund" + ((c !== 1) ? "er" : ""); },
millisecond: function(c) { return "millisekund" + ((c !== 1) ? "er" : ""); }
},
tr: {

@@ -197,11 +202,3 @@ year: "yıl",

delimiter: ", ",
units: [
"year",
"month",
"week",
"day",
"hour",
"minute",
"second"
],
units: ["year", "month", "week", "day", "hour", "minute", "second"],
languages: {}

@@ -278,3 +275,3 @@ }, passedOptions);

humanizeDuration.humanizer = humanizer;
if ((typeof module !== "undefined") && (module.exports)) {
if (typeof module !== "undefined") {
module.exports = humanizeDuration;

@@ -281,0 +278,0 @@ } else {

@@ -11,3 +11,3 @@ {

],
"version": "2.1.0",
"version": "2.2.0",
"description": "Convert millisecond durations to English and many other languages.",

@@ -17,12 +17,11 @@ "homepage": "https://github.com/EvanHahn/HumanizeDuration.js",

"scripts": {
"test": "mocha && jshint humanize-duration.js",
"test": "mocha",
"hint": "jshint humanize-duration.js"
},
"devDependencies": {
"chai": "^1.9.2",
"coffee-script": "^1.8.0",
"jshint": "^2.5.8",
"csv-parse": "0.0.6",
"jshint": "^2.5.11",
"mocha": "^2.0.1",
"sinon": "^1.11.1",
"sugar": "^1.4.1"
"ms": "^0.7.0"
},

@@ -51,30 +50,2 @@ "keywords": [

],
"jshintConfig": {
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"es3": true,
"forin": false,
"freeze": true,
"immed": true,
"indent": 2,
"latedef": true,
"maxdepth": 6,
"maxparams": 5,
"newcap": true,
"noarg": true,
"noempty": true,
"nonbsp": true,
"nonew": true,
"plusplus": false,
"quotmark": "double",
"strict": false,
"undef": true,
"unused": true,
"predef": [
"module"
]
},
"repository": {

@@ -81,0 +52,0 @@ "type": "git",

@@ -19,11 +19,11 @@ Humanize Duration

<script>
humanizeDuration(12000);
humanizeDuration(12000)
</script>
```
In Node or Browserify:
In Node (or Browserify or Webpack or anywhere with CommonJS):
```js
var humanizeDuration = require("humanize-duration");
humanizeDuration(12000);
var humanizeDuration = require("humanize-duration")
humanizeDuration(12000)
```

@@ -70,3 +70,3 @@

units: ["years", "months", "days"]
});
})

@@ -80,3 +80,3 @@ spanishHumanizer(71177400000) // "2 años, 3 meses, 2 días"

Supported languages
--------------------
-------------------

@@ -99,2 +99,3 @@ Humanize Duration supports the following languages:

* Spanish (es)
* Swedish (sv)
* Turkish (tr)

@@ -105,4 +106,4 @@

Lovingly made by [Evan Hahn](http://evanhahn.com/) with language support by [Martin Prins](https://github.com/magarcia). Thanks to [Filipi Siqueira](https://github.com/filipi777) for Portuguese support, [Peter Rekdal Sunde](https://github.com/peters) for Norwegian support, [Michał Janiec](https://github.com/mjjaniec) for Polish support, and [Eileen Li](https://github.com/eileen3) for Chinese support.
Lovingly made by [Evan Hahn](http://evanhahn.com/) with language support by [Martin Prins](https://github.com/magarcia). Thanks to [Filipi Siqueira](https://github.com/filipi777) for Portuguese support, [Peter Rekdal Sunde](https://github.com/peters) for Norwegian support, [Michał Janiec](https://github.com/mjjaniec) for Polish support, [Eileen Li](https://github.com/eileen3) for Chinese support and [Tommy Brunn](https://github.com/Nevon) for Swedish support.
Licensed under the WTFPL, so you can do whatever you want. Enjoy!
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