![The Push to Ban Ransom Payments Is Gaining Momentum](https://cdn.sanity.io/images/cgdhsj6q/production/0994333615c4405c37860f8fe515d5b2246acca7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
find-up-glob
Advanced tools
Readme
Find a file by walking up parent directories
$ npm install --save find-up-glob
/
└── Users
└── tanhauhau
├── unicorn.png
└── foo
└── bar
├── a.js
└── b.js
└── awesome.txt
└── super.txt
var findUpGlob = require('find-up-glob');
//asynchronous using promise
findUpGlob('*.js').then(function(files){
console.log(files)
//=> ['/Users/tanhauhau/foo/bar/a.js', '/Users/tanhauhau/foo/bar/b.js']
})
//synchronous
var files = findUpGlob.sync('*.txt');
//=> ['/Users/tanhauhau/foo/awesome.txt', '/Users/tanhauhau/foo/super.txt']
Returns a promise for the array of filepath or null
.
Returns an array of filepath or null
.
glob
Type: string
Glob pattern for filename matching, using minimatch to match
options
cwd
Type: string
Default: process.cwd()
Directory to start from.
To match a parent folder you should use:
findUpGlob('**/bar/*.js')
instead of findUpGlob('/bar/*.js')
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT
FAQs
Find a file by walking up parent directories
We found that find-up-glob demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).