{"_id":"filename-reserved-regex","_rev":"219360","name":"filename-reserved-regex","description":"Regular expression for matching reserved filename characters","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2023-03-24T09:32:27.000Z","created":"2015-01-14T05:11:37.159Z","3.0.0":"2021-08-16T00:17:20.214Z","2.0.0":"2016-10-10T04:10:17.460Z","1.0.0":"2015-01-14T05:11:37.159Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/filename-reserved-regex.git"},"versions":{"3.0.0":{"name":"filename-reserved-regex","version":"3.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":"./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,"key":"/filename-reserved-regex/-/filename-reserved-regex-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/filename-reserved-regex/download/filename-reserved-regex-3.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_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,"_cnpmcore_publish_time":"2021-12-13T16:42:44.907Z"},"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":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"abf73dfab735d045440abfea2d91f389ebbfa229","size":1853,"noattachment":false,"key":"/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/filename-reserved-regex/download/filename-reserved-regex-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/filename-reserved-regex-2.0.0.tgz_1476072615480_0.5545019111596048"},"directories":{},"publish_time":1476072617460,"_cnpm_publish_time":1476072617460,"_hasShrinkwrap":false},"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":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"e61cf805f0de1c984567d0386dc5df50ee5af7e4","size":1522,"noattachment":false,"key":"/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/filename-reserved-regex/download/filename-reserved-regex-1.0.0.tgz"},"directories":{},"publish_time":1421212297159,"_cnpm_publish_time":1421212297159,"_hasShrinkwrap":false}},"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.\n\n## Install\n\n```\n$ npm 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`.\n","_attachments":{},"homepage":"https://github.com/sindresorhus/filename-reserved-regex#readme","bugs":{"url":"https://github.com/sindresorhus/filename-reserved-regex/issues"},"license":"MIT"}