Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
dat-ignore
Advanced tools
More info on active projects and modules at dat-ecosystem.org
default ignore for dat
Check if a file should be ignored for Dat:
.dat
by default.datignore
filenpm install dat-ignore
var datIgnore = require('dat-ignore')
var ignore = datIgnore('/data/dir')
console.log(ignore('.dat')) // true
console.log(ignore('.git')) // true
console.log(ignore('dat-data')) // false
console.log(ignore('cat.jpg')) // false
Uses anymatch to match file paths.
Common configuration options.
var ignore = datIgnore('/data/dir', {
ignore: [
'**/node_modules/**',
'path/to/file.js',
'path/anyjs/**/*.js'
]
})
var ignore = datIgnore('/data/dir', { ignoreHidden: false })
var ignore = datIgnore('/data/dir', {
datignorePath: '~/.datignore'
})
.datignore
as string/bufferPass in a string as a newline delimited list of things to ignore.
var datIgnoreFile = fs.readFileSync('~/.datignore')
datIgnoreFile += '\n' + fs.readFileSync(path.join(dir, '.datignore'))
datIgnoreFile += '\n' + fs.readFileSync(path.join(dir, '.gitignore'))
var ignore = datIgnore('/data/dir', { datignore: datIgnoreFile })
var ignore = datIgnore(dir, [opts])
Returns a function that checks if a path should be ignored:
ignore('.dat') // true
ignore('.git') // true
ignore('data/cats.csv') // false
dir
dir
is the file root to compare to. It is also used to find .datignore
, if not specified.
opts.ignore
- Extend custom ignore with any anymatch string or array.opts.useDatIgnore
- Use the .datignore
file in dir
(default: true)opts.ignoreHidden
- Ignore all hidden files/folders (default: true)opts.datignorePath
- Path to .datignore
file (default: dir/.datignore
)opts.datignore
- Pass .datignore
as buffer or stringFAQs
default ignore for dat
The npm package dat-ignore receives a total of 58 weekly downloads. As such, dat-ignore popularity was classified as not popular.
We found that dat-ignore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.