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.9.3 to 0.9.4

14

package.json
{
"name": "cleaner-node",
"version": "0.9.3",
"version": "0.9.4",
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.",
"main": "index.js",
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix src/**/*.js"
"lint": "eslint ./src/**/*.js",
"lint:fix": "eslint ./src/**/*.js --fix"
},

@@ -43,9 +43,9 @@ "repository": {

"md5-file": "^5.0.0",
"moment": "^2.24.0",
"moment": "^2.26.0",
"semver": "^7.3.2",
"uuid": "^8.0.0",
"uuid": "^8.1.0",
"uuid-validate": "0.0.3"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint": "^7.0.0",
"eslint-config-airbnb": "^18.1.0",

@@ -59,5 +59,5 @@ "eslint-config-airbnb-base": "^14.1.0",

"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^2.5.0",
"eslint-plugin-react-hooks": "^4.0.2",
"eslint-plugin-standard": "^4.0.1"
}
}

@@ -42,1 +42,2 @@ # cleaner-node

| 0.9.3 | 2020/05/19 | Add `strings.toSnakeCase`. |
| 0.9.4 | 2020/05/20 | Add `files.copyFile` && `files.moveFile`. |

@@ -259,2 +259,15 @@ const fs = require('fs');

const copyFile = (sourcePath, targetPath, overwrite = true) => {
if (!isFile(sourcePath)) { return false; }
if (!overwrite && isFile(targetPath)) { return false; }
if (!createPath(path.dirname(targetPath))) { return false; }
fs.copyFileSync(sourcePath, targetPath);
return isFile(targetPath);
}
const moveFile = (sourcePath, targetPath, overwrite = true) => {
if (!copyFile(sourcePath, targetPath, overwrite)) { return false; }
fs.deleteFile(sourcePath);
return !isFile(targetPath);
}
module.exports = {

@@ -284,3 +297,6 @@ checksum,

readLines
readLines,
copyFile,
moveFile
};
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