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.1 to 0.2.2

2

package.json
{
"name": "cleaner-node",
"version": "0.2.1",
"version": "0.2.2",
"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",

@@ -9,2 +9,6 @@ const cc = require('camelcase');

const isPossible = value => {
return ['string', 'number', 'boolean', 'undefined'].indexOf(typeof value) >= 0;
}
const has = (value, target, isCaseSensitive = false) => {

@@ -198,2 +202,10 @@ if (typeof value !== 'string') { return false; }

const padLeft = (value, length = 2, character = '0') => {
if (!isPossible(value)) { return value; }
let padding = '';
while ((padding + String(value)).length < length) {
padding += character;
}
return `${padding}${String(value)}`;
}

@@ -216,2 +228,3 @@ module.exports = {

unique,
isPossible,
isValid,

@@ -233,3 +246,5 @@ isValidChars,

endsWith,
removeSuffix
removeSuffix,
padLeft
};
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