humanize-duration
Advanced tools
Comparing version 2.7.0 to 2.8.0
@@ -10,2 +10,3 @@ How to contribute | ||
1. Make your changes. Please add tests! If adding a new language, define some tests in *test/definitions*. | ||
1. Update `HISTORY.md` with your changes. | ||
1. If adding a new language, add it to the README. | ||
@@ -12,0 +13,0 @@ 1. Credit yourself in the README and in `package.json`. |
@@ -0,1 +1,6 @@ | ||
2.8.0 / 2015-05-10 | ||
================== | ||
* new: `getSupportedLanguages` | ||
2.7.0 / 2015-05-08 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -358,3 +358,15 @@ // HumanizeDuration.js - http://git.io/j0HgmQ | ||
function getSupportedLanguages() { | ||
var result = []; | ||
for (var language in languages) { | ||
if (languages.hasOwnProperty(language)) { | ||
result.push(language); | ||
} | ||
} | ||
return result; | ||
} | ||
humanizeDuration.humanizer = humanizer; | ||
humanizeDuration.getSupportedLanguages = getSupportedLanguages; | ||
if (typeof define === "function" && define.amd) { | ||
@@ -361,0 +373,0 @@ define(function() { |
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "Convert millisecond durations to English and many other languages.", | ||
@@ -24,7 +24,7 @@ "homepage": "https://github.com/EvanHahn/HumanizeDuration.js", | ||
"devDependencies": { | ||
"coffee-script": "^1.8.0", | ||
"csv-parse": "^0.1.0", | ||
"coffee-script": "^1.9.2", | ||
"csv-parse": "^0.1.1", | ||
"jshint": "^2.7.0", | ||
"mocha": "^2.2.4", | ||
"ms": "^0.7.0" | ||
"ms": "^0.7.1" | ||
}, | ||
@@ -31,0 +31,0 @@ "keywords": [ |
@@ -145,2 +145,9 @@ Humanize Duration | ||
For a list of supported languages, you can use the `getSupportedLanguages` function. | ||
```js | ||
humanizeDuration.getSupportedLanguages() | ||
// ["ar", "ca", "da", "de" ...] | ||
``` | ||
Credits | ||
@@ -147,0 +154,0 @@ ------- |
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
22728
351
167