Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Latest commit

 

History

History
17 lines (14 loc) · 333 Bytes

File metadata and controls

17 lines (14 loc) · 333 Bytes

@beaker/datignore

A module for reading and using .datignore files.

const datignore = require('@beaker/datignore')
const anymatch = require('anymatch')

// convert a .datignore to rules that can be fed into anymatch()
const rules = datignore.toAnymatchRules(`
  .git
  .dat
  node_modules
  *.log
`)
anymatch(rules, ...)