vague-time
Advanced tools
Comparing version 0.5.2 to 0.5.3
{ | ||
"name": "vague-time", | ||
"repo": "philbooth/vagueTime.js", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"author": "Phil Booth <pmbooth@gmail.com>", | ||
@@ -6,0 +6,0 @@ "description": "A tiny library that formats precise time differences as a vague/fuzzy time, e.g. '3 months ago', 'just now' or 'in 2 hours'.", |
{ | ||
"name": "vague-time", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"author": "Phil Booth <pmbooth@gmail.com>", | ||
@@ -30,6 +30,6 @@ "description": "A tiny library that formats precise time differences as a vague/fuzzy time, e.g. '3 months ago', 'just now' or 'in 2 hours'.", | ||
"jake": "0.5.x", | ||
"jshint": "1.0.x", | ||
"mocha": "1.7.x", | ||
"chai": "1.4.x", | ||
"uglify-js": "2.2.x" | ||
"jshint": "2.1.x", | ||
"mocha": "1.9.x", | ||
"chai": "1.6.x", | ||
"uglify-js": "2.3.x" | ||
}, | ||
@@ -36,0 +36,0 @@ "license": "MIT", |
@@ -13,3 +13,13 @@ # vagueTime.js | ||
[vagueDate.js][vague-date]. | ||
Or if you would like | ||
to parse vague time strings | ||
rather than generate them, | ||
you should try | ||
Matthew Mueller's [date] | ||
or Tim Wood's [moment]. | ||
## License | ||
[MIT][license] | ||
## Installation | ||
@@ -136,2 +146,5 @@ | ||
[vague-date]: https://github.com/philbooth/vagueDate.js | ||
[date]: https://github.com/MatthewMueller/date | ||
[moment]: https://github.com/timrwood/moment | ||
[license]: https://github.com/philbooth/vagueTime.js/blob/master/COPYING | ||
[node]: http://nodejs.org/ | ||
@@ -138,0 +151,0 @@ [browserify]: http://browserify.org/ |
@@ -1,1 +0,1 @@ | ||
(function(t){"use strict";function n(t){var n,o=e(t.units),u=Date.now(),f=r(t.from,o,u),a=r(t.to,o,u),s=f-a;return s>0?n="past":(n="future",s=-s),i(s,n)}function e(t){if(t===void 0)return"ms";if("s"===t||"ms"===t)return t;throw Error("Invalid units")}function r(t,n,e){if(t===void 0)return e;if("string"==typeof t&&(t=parseInt(t,10)),o(t)&&u(t))throw Error("Invalid time");return"number"==typeof t&&"s"===n&&(t*=1e3),t}function o(t){return"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime())}function u(t){return"number"!=typeof t||isNaN(t)}function i(t,n){var e,r;for(e in m)if(m.hasOwnProperty(e)&&t>=m[e])return r=Math.floor(t/m[e]),d[n](r,f(e,r));return p[n]}function f(t,n){return t+(n>1?"s":"")}function a(t,n){return t+" "+n+" ago"}function s(t,n){return"in "+t+" "+n}function c(){"function"==typeof define&&define.amd?define(function(){return l}):"object"==typeof module&&null!==module?module.exports=l:t.vagueTime=l}var m={year:315576e5,month:26298e5,week:6048e5,day:864e5,hour:36e5,minute:6e4},p={past:"just now",future:"soon"},d={past:a,future:s},l={get:n};c()})(this); | ||
!function(e){"use strict";function t(e){var t,u=n(e.units),o=Date.now(),f=r(e.from,u,o),a=r(e.to,u,o),s=f-a;return s>0?t="past":(t="future",s=-s),i(s,t)}function n(e){if("undefined"==typeof e)return"ms";if("s"===e||"ms"===e)return e;throw new Error("Invalid units")}function r(e,t,n){if("undefined"==typeof e)return n;if("string"==typeof e&&(e=parseInt(e,10)),u(e)&&o(e))throw new Error("Invalid time");return"number"==typeof e&&"s"===t&&(e*=1e3),e}function u(e){return"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime())}function o(e){return"number"!=typeof e||isNaN(e)}function i(e,t){var n,r;for(n in p)if(p.hasOwnProperty(n)&&e>=p[n])return r=Math.floor(e/p[n]),m[t](r,f(n,r));return d[t]}function f(e,t){return e+(t>1?"s":"")}function a(e,t){return e+" "+t+" ago"}function s(e,t){return"in "+e+" "+t}function c(){"function"==typeof define&&define.amd?define(function(){return y}):"object"==typeof module&&null!==module?module.exports=y:e.vagueTime=y}var p={year:315576e5,month:26298e5,week:6048e5,day:864e5,hour:36e5,minute:6e4},d={past:"just now",future:"soon"},m={past:a,future:s},y={get:t};c()}(this); |
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
38081
158