{"name":"linkfs","version":"0.0.2","description":"Rewrite `fs` paths","main":"index.js","repository":{"type":"git","url":"git+https://github.com/streamich/linkfs.git"},"gitHead":"112ff0232c6951d6f996446ac9b759f720a24305","bugs":{"url":"https://github.com/streamich/linkfs/issues"},"homepage":"https://github.com/streamich/linkfs#readme","_id":"linkfs@0.0.2","scripts":{},"_shasum":"7c85f71e28f560d977d26e4c24b31a82c0b9b1e6","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"streamich","email":"streamich@dalecky.com"},"maintainers":[{"name":"streamich","email":"streamich@dalecky.com"}],"dist":{"shasum":"7c85f71e28f560d977d26e4c24b31a82c0b9b1e6","tarball":"http://registry-npm.ywwl.com/linkfs/download/linkfs-0.0.2.tgz","integrity":"sha512-wZecLCCq806b+Q2D+6i73yiUxpag4ekKNXeh/ju+W6OrGUwA8rysgEBEReGGOH0St2x8ZXOJ8baSQH7s1YUPtw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB7RA7h728aq/HIf6f42YLmF8CVDTx6tPedd9ldq2AwzAiAZnnACAqPEP1JMzndPbOPHqNsLUQ9kz03z1fMI9NsyRA=="}],"size":1245,"noattachment":false,"key":"/linkfs/-/linkfs-0.0.2.tgz"},"directories":{},"readme":"# linkfs\n\nRedirects filesystem paths.\n\n[![][npm-img]][npm-url] [![][travis-badge]][travis-url]\n\n    npm install --save linkfs\n\n```js\nimport {link} from 'linkfs';\nimport {fs} from 'memfs';\n\nfs.writeFileSync('/foo', 'bar');\nconst lfs = link(fs, ['/foo2', '/foo']);\nconsole.log(lfs.readFileSync('/foo2', 'utf8')); // bar\n```\n\n# Reference\n\n### `link(fs, rewrites)`\n\nReturns a new *fs-like* object with redirected file paths.\n\n`fs` is the source *fs-like* object.\n\n`rewrites` is a 2-tuple or an array of 2-tuples, where each 2-tuple\nhas a form of `[from, to]`. `from` is the new, *virtual* path; and `to`\nis an existing path in the `fs` filesystem.\n\n```js\nconst lfs = link(fs, ['/foo', '/bar']);\n```\n\nor\n\n```js\nconst lfs = link(fs, [\n    ['/foo1', '/bar1'],\n    ['/foo2', '/bar2'],\n    ['/foo3', '/bar3'],\n]);\n```\n\n[npm-url]: https://www.npmjs.com/package/linkfs\n[npm-img]: https://img.shields.io/npm/v/linkfs.svg\n[memfs]: https://github.com/streamich/memfs\n[unionfs]: https://github.com/streamich/unionfs\n[linkfs]: https://github.com/streamich/linkfs\n[fs-monkey]: https://github.com/streamich/fs-monkey\n[travis-url]: https://travis-ci.org/streamich/linkfs\n[travis-badge]: https://travis-ci.org/streamich/linkfs.svg?branch=master\n\n\n\n# License\n\n[Unlicense](./LICENSE) - public domain.\n","publish_time":1434405516658,"_cnpm_publish_time":1434405516658,"dist-tags":{"latest":"2.1.0"}}