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.7 to 0.0.8

24

index.js

@@ -19,2 +19,4 @@ /* eslint-disable no-console */

const reTimeParam = /^(\d+)([dhms]$)/i;
module.exports = {

@@ -423,2 +425,24 @@ getRecognitionScore (unrecognizedString, recognizedString) {

},
getTimeParamMillis: (val) => {
const [, nn, dhms] = reTimeParam.exec(val || '') || [];
if (!nn) {
return;
}
let sec = 0;
switch (dhms.toLowerCase()) {
case 'd':
sec = 24 * 3600 * nn;
break;
case 'h':
sec = 3600 * nn;
break;
case 'm':
sec = 60 * nn;
break;
default:
sec = nn;
}
return sec * 1000;
},
};

2

package.json
{
"name": "af-fns",
"version": "0.0.7",
"version": "0.0.8",
"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