Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

af-fns

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

af-fns - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

38

index.js

@@ -19,3 +19,3 @@ /* eslint-disable no-console */

const timeParamRE = /^(\d+)([dhms]$)/i;
const timeParamRE = /^(\d+)\s*(years?|y|months?|mo|weeks?|w|days?|d|hours?|h|minutes?|min|m|seconds?|sec|s|milliseconds?|millis|ms)$/i;

@@ -434,14 +434,48 @@ module.exports = {

let sec = 0;
switch (dhms.toLowerCase()) {
case 'y':
case 'year':
case 'years':
sec = 365 * 24 * 3600 * nn;
break;
case 'mo':
case 'month':
case 'months':
sec = 30 * 24 * 3600 * nn;
break;
case 'w':
case 'week':
case 'weeks':
sec = 7 * 24 * 3600 * nn;
break;
case 'd':
case 'day':
case 'days':
sec = 24 * 3600 * nn;
break;
case 'h':
case 'hour':
case 'hours':
sec = 3600 * nn;
break;
case 'm':
case 'min':
case 'minute':
case 'minutes':
sec = 60 * nn;
break;
case 's':
case 'sec':
case 'second':
case 'seconds':
sec = nn;
break;
case 'ms':
case 'millis':
case 'millisecond':
case 'milliseconds':
return +nn;
default:
sec = nn;
return +nn;
}

@@ -448,0 +482,0 @@ return sec * 1000;

2

package.json
{
"name": "af-fns",
"version": "0.0.9",
"version": "0.0.10",
"description": "A highly specialized function library",

@@ -5,0 +5,0 @@ "main": "index.js",

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