Comparing version 1.0.5-next.0 to 1.0.5-next.1
@@ -1,2 +0,2 @@ | ||
"use strict";const e=36e5,t=24*e,n={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3};exports.datePlus=(e,t=new Date)=>new Date(t.getTime()+(e=>{if(+e)return+e;const[,t,r]=e.match(/^([^ ]+) +(\w\w*?)s?$/)||[];return+t*(n[r]||1)})(e)); | ||
"use strict";const e=36e5,t=24*e,n={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3,m:1};exports.datePlus=(e,t=new Date)=>new Date(t.getTime()+(e=>{if(+e)return+e;const[,t,r]=e.match(/^([^ ]+) +(\w\w*?)s?$/)||[];return+t*(n[r]||1)})(e)); | ||
//# sourceMappingURL=datePlus.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";const e=36e5,t=24*e,o={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3};exports.duration=(e,{parts:t=9,join:n=", "}={})=>{let r,s=[];for(let[i,c]of Object.entries(o))if((e>=c||"second"==i)&&t-- >0&&(e-=(r=e/c|0)*c,t&&"second"!=i||(r+=e/c),1!=r&&(i+="s"),s.push(n?r+" "+i:[i,r]),!e))break;return n?s.join(n):s}; | ||
"use strict";const e=36e5,t=24*e,o={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3,m:1};exports.duration=(e,{parts:t=9,join:r=", "}={})=>{let n,s=[];for(let[i,u]of Object.entries(o))e>=u&&t-- >0&&(e-=(n=e/u|0)*u,t||(n+=e/u),1==n&&"m"!=i||(i+="s"),s.push(r?n+" "+i:[i,n]));return r?s.join(r):s}; | ||
//# sourceMappingURL=duration.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";const e=36e5,t=24*e,s={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3},r=e=>{if(+e)return+e;const[,t,r]=e.match(/^([^ ]+) +(\w\w*?)s?$/)||[];return+t*(s[r]||1)};exports.datePlus=(e,t=new Date)=>new Date(t.getTime()+r(e)),exports.duration=(e,{parts:t=9,join:r=", "}={})=>{let n,o=[];for(let[a,c]of Object.entries(s))if((e>=c||"second"==a)&&t-- >0&&(e-=(n=e/c|0)*c,t&&"second"!=a||(n+=e/c),1!=n&&(a+="s"),o.push(r?n+" "+a:[a,n]),!e))break;return r?o.join(r):o},exports.ms=r,exports.seconds=e=>r(e)/1e3; | ||
"use strict";const e=36e5,t=24*e,s={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3,m:1},r=e=>{if(+e)return+e;const[,t,r]=e.match(/^([^ ]+) +(\w\w*?)s?$/)||[];return+t*(s[r]||1)};exports.datePlus=(e,t=new Date)=>new Date(t.getTime()+r(e)),exports.duration=(e,{parts:t=9,join:r=", "}={})=>{let n,o=[];for(let[u,a]of Object.entries(s))e>=a&&t-- >0&&(e-=(n=e/a|0)*a,t||(n+=e/a),1==n&&"m"!=u||(u+="s"),o.push(r?n+" "+u:[u,n]));return r?o.join(r):o},exports.ms=r,exports.seconds=e=>r(e)/1e3; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";const e=36e5,t=24*e,r={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3};exports.ms=e=>{if(+e)return+e;const[,t,s]=e.match(/^([^ ]+) +(\w\w*?)s?$/)||[];return+t*(r[s]||1)}; | ||
"use strict";const e=36e5,t=24*e,r={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3,m:1};exports.ms=e=>{if(+e)return+e;const[,t,s]=e.match(/^([^ ]+) +(\w\w*?)s?$/)||[];return+t*(r[s]||1)}; | ||
//# sourceMappingURL=ms.js.map |
{ | ||
"name": "itty-time", | ||
"version": "1.0.5-next.0", | ||
"version": "1.0.5-next.1", | ||
"description": "Ultra-small (~390 bytes) library for TTL date math and converting ms durations to and from strings.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -1,2 +0,2 @@ | ||
"use strict";const e=36e5,t=24*e,s={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3};exports.seconds=e=>(e=>{if(+e)return+e;const[,t,n]=e.match(/^([^ ]+) +(\w\w*?)s?$/)||[];return+t*(s[n]||1)})(e)/1e3; | ||
"use strict";const e=36e5,t=24*e,s={year:315576e5,month:30*t,week:7*t,day:t,hour:e,minute:6e4,second:1e3,m:1};exports.seconds=e=>(e=>{if(+e)return+e;const[,t,n]=e.match(/^([^ ]+) +(\w\w*?)s?$/)||[];return+t*(s[n]||1)})(e)/1e3; | ||
//# sourceMappingURL=seconds.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
19197
40