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

search-act-replace

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

search-act-replace - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.sarignore

26

index.js

@@ -0,9 +1,29 @@

var fs = require('fs');
var path = require('path');
var findit = require('findit');
var fs = require('fs');
var ignore = require('ignore');
function sar(path, regex, cb) {
var finder = findit(path);
function sar(root, regex, cb) {
var finder = findit(root);
var accepts = ignore()
.addIgnoreFile(path.join(__dirname, '.sarignore'))
.addIgnoreFile(path.join(root, '.sarignore'))
.addIgnoreFile(path.join(root, '.gitignore'))
.createFilter()
;
finder.on('directory', function (dir, stat, stop) {
if (!accepts(dir)) {
console.log('ignored folder' + dir);
stop();
}
})
finder.on('file', function (file, stat) {
if (!accepts(file)) {
console.log('ignored file');
return;
}
fs.readFile(file, 'utf-8', function (err, text) {

@@ -10,0 +30,0 @@

5

package.json
{
"name": "search-act-replace",
"version": "0.0.1",
"version": "0.0.2",
"description": "Search through file system and replace after callback.",

@@ -17,3 +17,6 @@ "main": "index.js",

"findit": "~1.2.0"
},
"dependencies": {
"ignore": "~2.2.12"
}
}

@@ -27,1 +27,6 @@ # Search-Act-Replace

```
The script will automatically ignore `.git`, `.svn`, `node_modules`,
and `bower_components` folders (have a look at the `.sarignore` file) as well
as files specified in the roots `.gitignore` file as well as a custom
`.sarignore` file in the root folder.
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