{"_id":"filesystem-constants","_rev":"1-7d1a6482b22fa89be9e0768b98c3fe4c","name":"filesystem-constants","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"filesystem-constants","version":"1.0.0","description":"Inlined FS constants without the FS module dependency.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/andrewosh/filesystem-constants.git"},"keywords":["hyperdrive","constants"],"author":{"name":"Andrew Osheroff","email":"andrewosh@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/andrewosh/filesystem-constants/issues"},"homepage":"https://github.com/andrewosh/filesystem-constants#readme","gitHead":"6429c54f3f73270662c0c7f3dc6f4b34004dccdc","_id":"filesystem-constants@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.8.0","_npmUser":{"name":"andrewosh","email":"andrewosh@gmail.com"},"dist":{"integrity":"sha512-/ue62eYa8Mk53dc1XXxT1nhwat3ygWMepjrFON8tBVjtjCTVUzM8JTEAQquNoZnmimM4dbxfV9tZeEav1KUccg==","shasum":"7eccf62dc8f3f09da5a98b3de1ff61a226a62e11","tarball":"https://registry.npmjs.org/filesystem-constants/-/filesystem-constants-1.0.0.tgz","fileCount":3,"unpackedSize":6064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrIkrCRA9TVsSAnZWagAAr2cP/1kqwqDWBLUEN/ZfubDE\nFv0Gemai/FzfYXQrCE7mwFvuk+oVwjiZKtVDrCmdqK6R10bAs63OBzuUSzmM\n8fstS6oZ/RrVVjcEtl4mNB9vFKdCK/85FjBEFhA6iZ/qkRSHEjiFCRIDIzmM\nx2ZnmCjR4Jr1Yl2UdaMa34cCBSiIVIcCyXFRaeen8DjTt60FyPi673Hx2Nh5\nslqB471h+FEs9i6endSpGg+vBHISty+I/lMnl7RAMexdwcSnQZ9EJZBhPGG/\nsjfBBdOsiuf3j8FYd3m7SfpEFs4UBr8acupUY+Yyw+fPZdOxqa5fV+rybi8F\n66iELnCTEPtRWsMrLM8bDfzJ9kViCkh9iNNrrIjl1t5cZZFs2s4M98Bbn4Ak\nQaaZf/iUznVm8l5xk+pOTEPHwWprYshjtJk6SrmETUp5t3Iji+kJOp172vuu\n6Kw2rxcqCJInTe9j3KwMCZtCsWaaMxHJ+DG334DLuz73WA6VUEOxPEX6M6UE\na4mCQCNpKZ4yaM6VG6/6MK7br/3tIcSijP7PhowoP0o3CycvueW8/oCfaOzB\n23UZ2HRMTesMnDGg2jzkTMNzVSnXb4XRLxeqI/ZfBM0O1TAwTVS0+mEEkKJD\nFQG86B6vwdQQJaIc24HDpENNTnF4sgVdN3uE4+dPCzljZJCoGZnNtYaPI2s8\nGK/5\r\n=F0AG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAUbMKabvjyMjPo0iiIDODXva5UazzvJ2kBKRD+X/H3JAiEAvq7hGNW2n/aXjke2O88io5H6Rtz/rlHCjP4qllVy87M="}]},"maintainers":[{"name":"andrewosh","email":"andrewosh@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filesystem-constants_1.0.0_1554811178488_0.5187909333244896"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-09T11:59:38.488Z","1.0.0":"2019-04-09T11:59:38.598Z","modified":"2022-05-02T10:03:10.923Z"},"maintainers":[{"name":"andrewosh","email":"andrewosh@gmail.com"}],"description":"Inlined FS constants without the FS module dependency.","homepage":"https://github.com/andrewosh/filesystem-constants#readme","keywords":["hyperdrive","constants"],"repository":{"type":"git","url":"git+https://github.com/andrewosh/filesystem-constants.git"},"author":{"name":"Andrew Osheroff","email":"andrewosh@gmail.com"},"bugs":{"url":"https://github.com/andrewosh/filesystem-constants/issues"},"license":"MIT","readme":"# filesystem-constants\nInlined FS constants without the dependency on Node's FS module.\n\nAlso provides a few utility functions for converting `fs.open` flags between OSX and Linux, and for converting between string and integer representations.\n\n## Installation\n`npm i filesystem-constants --save`\n\n## Usage\n### `constants.linux`\nFS constants on Linux, copied from `fs.constants`.\n\n### `constants.darwin`\nFS constants on OSX, copied from `fs.constants`.\n\n### `constants.parse`\nConverts flags from their string representation (i.e. 'r') to a flags integer.\n\n```js\nconst { linux, parse } = require('filesystem-constants')\nconst flags = parse(linux, 'w+') // 578\n```\n\n### `constants.translate(from, to, flags)`\nTranslates flags between two platform-specific representations.\n\n```js\nconst { linux, darwin, translate } = require('filesystem-constants')\ntranslate(darwin, linux, darwin.O_CREATE | darwin.O_APPEND) // 1088 (linux.O_CREATE | linux.O_APPEND)\n```\n\n## License\nMIT\n","readmeFilename":"README.md"}