{"versions":{"1.0.0":{"name":"filename-reserved-regex","version":"1.0.0","description":"Regular expression for matching reserved filename characters","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/filename-reserved-regex"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["re","regex","regexp","filename","reserved"],"devDependencies":{"ava":"0.0.4"},"gitHead":"70c39b691414977a61ca346a2092ee1bf02ff669","bugs":{"url":"https://github.com/sindresorhus/filename-reserved-regex/issues"},"homepage":"https://github.com/sindresorhus/filename-reserved-regex","_id":"filename-reserved-regex@1.0.0","_shasum":"e61cf805f0de1c984567d0386dc5df50ee5af7e4","_from":".","_npmVersion":"2.1.18","_nodeVersion":"1.0.0","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"e61cf805f0de1c984567d0386dc5df50ee5af7e4","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz"},"directories":{},"contributors":[]},"2.0.0":{"name":"filename-reserved-regex","version":"2.0.0","description":"Regular expression for matching reserved filename characters","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/filename-reserved-regex.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["re","regex","regexp","filename","reserved","illegal"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"af9c88cd73ba944ec27c64173aa9017ec80e7d2a","bugs":{"url":"https://github.com/sindresorhus/filename-reserved-regex/issues"},"homepage":"https://github.com/sindresorhus/filename-reserved-regex#readme","_id":"filename-reserved-regex@2.0.0","_shasum":"abf73dfab735d045440abfea2d91f389ebbfa229","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"shasum":"abf73dfab735d045440abfea2d91f389ebbfa229","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz"},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/filename-reserved-regex-2.0.0.tgz_1476072615480_0.5545019111596048"},"directories":{},"contributors":[]},"3.0.0":{"name":"filename-reserved-regex","version":"3.0.0","description":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/filename-reserved-regex.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["regex","regexp","filename","reserved","illegal"],"devDependencies":{"ava":"^3.15.0","xo":"^0.44.0"},"gitHead":"fd7b8a31b2f4b898688da847cd59aee0051a604d","bugs":{"url":"https://github.com/sindresorhus/filename-reserved-regex/issues"},"homepage":"https://github.com/sindresorhus/filename-reserved-regex#readme","_id":"filename-reserved-regex@3.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"shasum":"3d5dd6d4e2d73a3fed2ebc4cd0b3448869a081f7","size":1721,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/filename-reserved-regex/-/filename-reserved-regex-3.0.0.tgz"},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filename-reserved-regex_3.0.0_1629073040077_0.18005453426210316"},"_hasShrinkwrap":false,"publish_time":1629073040214,"_cnpm_publish_time":1629073040214,"contributors":[]},"4.0.0":{"name":"filename-reserved-regex","version":"4.0.0","description":"Regular expression for matching reserved filename characters","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/filename-reserved-regex.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava"},"keywords":["regex","regexp","filename","reserved","illegal"],"devDependencies":{"ava":"^6.4.1","xo":"^1.2.2"},"_id":"filename-reserved-regex@4.0.0","gitHead":"1403e86e937f0955fbb0ffad4ce56fbae47e3cc0","bugs":{"url":"https://github.com/sindresorhus/filename-reserved-regex/issues"},"homepage":"https://github.com/sindresorhus/filename-reserved-regex#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-9ZT504KxEQDamsOogZImAWGEN24R1uFAxU3ZS4AZqn2ooidmN68Olh7n4/RcA4lLatZztjA0ZSuxeLHVoCc8JA==","shasum":"bc981c1e5c8aee7d32ac8594c109aa14682b01d2","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/filename-reserved-regex/-/filename-reserved-regex-4.0.0.tgz","fileCount":4,"unpackedSize":3239,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDm4HJQ6PRkPNV+dBH7xfBpLovmzkshdTBQDmfkFCMo9AIgAOsdyg27fr3BF0HYnGWPp7FWZbniRgIIu0Q5MPr7cc8="}],"size":1780},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/filename-reserved-regex_4.0.0_1757887535057_0.9073074170092075"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-14T22:05:35.237Z","publish_time":1757887535237,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"4.0.0"},"name":"filename-reserved-regex","time":{"modified":"2025-09-14T22:05:48.716Z","created":"2022-01-26T13:26:01.687Z","1.0.0":"2015-01-14T05:11:37.159Z","2.0.0":"2016-10-10T04:10:17.460Z","3.0.0":"2021-08-16T00:17:20.214Z","4.0.0":"2025-09-14T22:05:35.237Z"},"readme":"# filename-reserved-regex\n\n> Regular expression for matching reserved filename characters\n\nOn Unix-like systems `/` is reserved and [`<>:\"/\\|?*`](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions) as well as non-printable characters `\\u0000-\\u001F` on Windows. Windows also doesn't allow names ending in space or period.\n\n## Install\n\n```sh\nnpm install filename-reserved-regex\n```\n\n## Usage\n\n```js\nimport filenameReservedRegex, {windowsReservedNameRegex} from 'filename-reserved-regex';\n\nfilenameReservedRegex().test('foo/bar');\n//=> true\n\nfilenameReservedRegex().test('foo-bar');\n//=> false\n\n'foo/bar'.replace(filenameReservedRegex(), '!');\n//=> 'foo!bar'\n\nwindowsReservedNameRegex().test('aux');\n//=> true\n```\n\n## API\n\n### filenameReservedRegex()\n\nReturns a regex that matches all invalid characters.\n\n### windowsReservedNameRegex()\n\nReturns an exact-match case-insensitive regex that matches invalid Windows\nfilenames. These include `CON`, `PRN`, `AUX`, `NUL`, `COM1`, `COM2`, `COM3`, `COM4`, `COM5`,\n`COM6`, `COM7`, `COM8`, `COM9`, `LPT1`, `LPT2`, `LPT3`, `LPT4`, `LPT5`, `LPT6`, `LPT7`, `LPT8`\nand `LPT9`.","users":{}}