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

utilsac

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utilsac - npm Package Compare versions

Comparing version 5.3.0 to 5.4.0

23

files.js

@@ -35,2 +35,4 @@ /*files.js*/

const copyFile = function (sourcePath, destination) {
/* fs.copyFile exists in Node 9+
todo if dest cannot be reached created folders until it is*/
return new Promise(function (resolve, reject) {

@@ -50,2 +52,20 @@ if (!fs.existsSync(sourcePath)) {

const deleteFile = function (sourcePath) {
return new Promise(function (resolve, reject) {
fs.unlink(sourcePath, function(error) {
if(error && error.code == "ENOENT") {
// file doens't exist
resolve(`File ${sourcePath} doesn't exist, won't remove it.`);
} else if (error) {
// other errors, e.g. maybe we don't have enough permission
reject(`Error occurred while trying to remove file ${sourcePath}`);
} else {
resolve(`removed`);
}
});
});
};
module.exports = {

@@ -55,3 +75,4 @@ textFileContentPromiseFromPath,

concatenateFiles,
copyFile
copyFile,
deleteFile
};

2

package.json
{
"name": "utilsac",
"version": "5.3.0",
"version": "5.4.0",
"description": "tools mostly",

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

@@ -13,3 +13,4 @@ # Utilities and random js files

concatenateFiles,
copyFile
copyFile,
deleteFile
} from "./files.js"

@@ -16,0 +17,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