humanize-duration
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -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! |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18496
5
11
105
300