Socket
Socket
Sign inDemoInstall

cleaner-node

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleaner-node - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

2

package.json
{
"name": "cleaner-node",
"version": "0.2.3",
"version": "0.3.0",
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.",

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

@@ -51,5 +51,5 @@ const moment = require('moment');

const toBlockDate = (value, includeMilliseconds = true) => {
const toBlockDate = (value, deliminator = '', includeMilliseconds = true) => {
const date = ifValid(value, (new Date()));
const result = [
const dateString = [
String(date.getFullYear()),

@@ -60,7 +60,6 @@ padLeft(date.getMonth() + 1),

padLeft(date.getMinutes()),
padLeft(date.getSeconds()),
'.',
padLeft(date.getMilliseconds(), 3)
].join('');
return includeMilliseconds ? result : result.split('.')[0];
padLeft(date.getSeconds())
].join(deliminator);
if (!includeMilliseconds) { return dateString; }
return [dateString, padLeft(date.getMilliseconds(), 3)].join('.');
}

@@ -67,0 +66,0 @@

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