{"name":"linkfs","version":"0.0.1","description":"Rewrite `fs` paths","main":"index.js","repository":{"type":"git","url":"git+https://github.com/streamich/linkfs.git"},"gitHead":"79fc47aa13882a844cd512e51a75c70bb432d380","bugs":{"url":"https://github.com/streamich/linkfs/issues"},"homepage":"https://github.com/streamich/linkfs#readme","_id":"linkfs@0.0.1","scripts":{},"_shasum":"c930afcafa4ccd794a3a057bb9fdda5c8857beed","_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":"c930afcafa4ccd794a3a057bb9fdda5c8857beed","tarball":"http://registry-npm.ywwl.com/linkfs/download/linkfs-0.0.1.tgz","integrity":"sha512-0jQL6lcyWgrjpQIka+fbG20nFrvy7AR8Ar5qkGl5y1t2Lnuzq5GboPThS3MpWAMI8LJMhIMBrWYHdLFzjjLlmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTAP0i+4O+6sbwQQ40tbJR3x/JzWSeSzpMt+kXOQlT+wIhAMAD8+F+qIIHiW0SdvhZLr5E+jcLWsWqEJ6vEJE/7UQt"}],"size":1174,"noattachment":false,"key":"/linkfs/-/linkfs-0.0.1.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":1434309214267,"_cnpm_publish_time":1434309214267,"dist-tags":{"latest":"2.1.0"}}