New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-all-files

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-all-files - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

.babelrc

19

package.json
{
"name": "node-all-files",
"version": "1.0.0",
"version": "1.1.0",
"description": "Few helpers to process all of the files in some folder",
"main": "index.js",
"main": "lib/index.js",
"scripts": {
"test": "node test.js"
"build": "BABEL_ENV=production babel --copy-files ./src --out-dir lib",
"test": "node tests/test.js"
},

@@ -21,3 +22,13 @@ "repository": {

},
"homepage": "https://github.com/asci/all-files#readme"
"homepage": "https://github.com/asci/all-files#readme",
"devDependencies": {
"babel": "^6.5.2",
"babel-cli": "^6.22.2"
},
"babel": {
"presets": [
"es2015",
"stage-2"
]
}
}
# all-files
Few helpers to process all of the files in some folder with promises
Helpers to process files recursively in folder with promises
## Prereq
- node 6
- node 4
- \*nix, macOs

@@ -11,5 +12,2 @@ ## How to install

###### or from Github
`npm install https://github.com/asci/all-files`
## How to use

@@ -24,7 +22,7 @@ ### getFilenames

// Supports RegExp, String and Function for filtering:
getFilenames(root, /\.js$/i);
getFilenames(folder, /\.js$/i);
//or
getFilenames(root, '.js');
getFilenames(folder, '.js');
//or
getFilenames(root, (f) => ~f.indexOf('.js'))
getFilenames(folder, (f) => ~f.indexOf('.js'))
.then(({ files }) => {

@@ -42,4 +40,6 @@ console.log(files);

processFiles(files, (buff) => {
processFiles(files, (buff, filename) => {
console.log(buff.toString().length);
}).then(() => {
console.log('All files were processed');
});

@@ -46,0 +46,0 @@

Sorry, the diff of this file is not supported yet

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