{"name":"cspell-glob","version":"8.13.2","keywords":["cspell","glob"],"author":"Jason Dent <jason@streetsidesoftware.nl>","license":"MIT","_id":"cspell-glob@8.13.2","homepage":"https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-glob#readme","bugs":{"url":"https://github.com/streetsidesoftware/cspell/labels/cspell-glob"},"dist":{"shasum":"0994798ae08d83a1e01584e8d7eeaa1d25f3d743","tarball":"http://registry-npm.ywwl.com/cspell-glob/download/cspell-glob-8.13.2.tgz","fileCount":11,"integrity":"sha512-zhWcfE4k1BVErVd36AMle9DE5W0bxI4OcM7/q3YxPQUdbsox/DihGXGQu+jld2LkUpDl0llIPVJ8OibKg9stcQ==","signatures":[{"sig":"MEQCIHY/oOaO7+F4qLX0j6qzqVdz1ZBcwArglAFG1H+91mnvAiAjgws+l1l4Nfpa+LCq7J3gOTxlXSDMNfWuDlil9ftfag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39813,"size":10666,"noattachment":false,"key":"/cspell-glob/-/cspell-glob-8.13.2.tgz"},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":"./dist/index.js"}},"gitHead":"5c9aaf8829991e7d6d37355acb9b9685088bba14","scripts":{"test":"vitest run","build":"tsc -p .","clean":"shx rm -rf dist temp coverage \"*.tsbuildInfo\"","watch":"tsc -p . -w","coverage":"vitest run --coverage","test:perf":"insight --file \"dist/perf/**/*.perf.{mjs,js}\" -t 1000","test:watch":"vitest","clean-build":"pnpm run clean && pnpm run build","test:perf:ts":"insight --register ts-node/esm --file \"src/perf/**/*.perf.{mts,ts}\" -t 1000","test:perf:prof":"NODE_ENV=production node --cpu-prof ../../node_modules/perf-insight/bin.mjs --file \"dist/perf/**/*.perf.{mjs,js}\" -t 1000"},"_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"repository":{"url":"https://github.com/streetsidesoftware/cspell.git","type":"git","directory":"packages/cspell-glob"},"_npmVersion":"lerna/3.8.0/node@v18.20.4+x64 (linux)","description":"Glob matcher for cspell","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"micromatch":"^4.0.7","@cspell/url":"8.13.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/micromatch":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/cspell-glob_8.13.2_1723100145498_0.5560132368932589","host":"s3://npm-registry-packages"},"readme":"# `cspell-glob`\n\nA simple library for checking filenames against a set of glob rules. It attempts to emulate the `.gitignore` rules.\n\n## Purpose\n\nThe purpose behind this library is a bit different than the other glob matchers.\nThe goal here is to see if a file name matches a glob, not to find files that match globs.\nThis library doesn't do any file i/o. It uses [micromatch](https://github.com/micromatch/micromatch#readme) under the hood for the actual matching.\n\n## Usage\n\n```ts\nimport { GlobMatcher } from 'cspell-glob';\n\n// Patterns behave like the contents of a `.gitignore` file.\nconst patterns = ['*.test.js', '!important.test.js'];\n\nconst matcher = new GlobMatcher(patterns, process.cwd());\n\nmatcher.match('src/app.test.js'); // true -- matches `*.test.js`\nmatcher.match('src/important.test.js'); // false -- excluded by the negated pattern\nmatcher.match('src/app.js'); // false -- does not match any pattern\n```\n\nBy default, `GlobMatcher` runs in `exclude` mode (like `.gitignore`). Use `include` mode when searching for\nfiles to check, where patterns must be more explicit to match:\n\n```ts\nconst matcher = new GlobMatcher(['src/**/*.ts'], { root: process.cwd(), mode: 'include' });\n\nmatcher.match('src/app.ts'); // true\nmatcher.match('node_modules/lib/index.ts'); // false\n```\n\n## CSpell for Enterprise\n\n<!--- @@inject: ../../static/tidelift.md --->\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n<!--- @@inject-end: ../../static/tidelift.md --->\n\n<!--- @@inject: ../../static/footer.md --->\n\n<br/>\n\n---\n\n<p align=\"center\">Brought to you by<a href=\"https://streetsidesoftware.com\" title=\"Street Side Software\"><img width=\"16\" alt=\"Street Side Software Logo\" src=\"https://i.imgur.com/CyduuVY.png\" /> Street Side Software</a></p>\n\n<!--- @@inject-end: ../../static/footer.md --->\n","publish_time":1723100145699,"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"_cnpm_publish_time":1723100145699,"dist-tags":{"cspell5":"5.21.2","cspell5-next":"5.21.2-alpha.0","latest":"10.4.1","next":"10.4.0-alpha.1"}}