{"name":"linkfs","version":"2.1.0","description":"Rewrites filesystem paths","main":"lib/index.js","keywords":["fs","file","file system","redirect","rewrite","link","mount","linkfs"],"repository":{"type":"git","url":"git+https://github.com/streamich/linkfs.git"},"dependencies":{},"devDependencies":{"memfs":"^2.0.5","jest":"21.2.1","ts-jest":"21.2.3","typescript":"2.4.2","ts-node":"3.3.0","babel-cli":"6.24.1","babel-preset-es2015":"6.24.1","gulp":"3.9.1","gulp-typescript":"3.2.1","source-map-support":"0.4.15","nyc":"11.1.0","semantic-release":"^8.2.0","@types/jest":"21.1.8","@types/node":"8.0.17"},"nyc":{"per-file":true,"include":["src/**/*.ts"],"exclude":["src/**/*.test.ts"],"extension":[".ts"],"require":["ts-node/register"],"reporter":["text","json","lcov","text-summary"],"sourceMap":true,"instrument":true,"cache":true},"scripts":{"build":"npm run build-ts && npm run build-js","build-ts":"gulp build-ts","build-js":"babel src --out-dir lib","test":"jest","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"jest":{"moduleFileExtensions":["ts","tsx","js","jsx"],"transform":{"^.+\\.tsx?$":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":".*/__tests__/.*\\.(test|spec)\\.(jsx?|tsx?)$"},"gitHead":"208c0e5fcf83e6864119d14b8bd13663c2bc9f89","bugs":{"url":"https://github.com/streamich/linkfs/issues"},"homepage":"https://github.com/streamich/linkfs#readme","_id":"linkfs@2.1.0","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"dist":{"integrity":"sha512-kmsGcmpvjStZ0ATjuHycBujtNnXiZR28BTivEu0gAMDTT7GEyodcK6zSRtu6xsrdorrPZEIN380x7BD7xEYkew==","shasum":"5cc774ad8ed6b0aae5a858bd67e3334cc300a917","tarball":"http://registry-npm.ywwl.com/linkfs/download/linkfs-2.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwRB4tKl/Qn8YDbIcssSJXuB6oZl/FoyxyKkJ879IgLAIhANEZE2SYNvRRrJ/pvSH2Rpmuv68yyPavxPb4G2qAXuBn"}],"size":4548,"noattachment":false,"key":"/linkfs/-/linkfs-2.1.0.tgz"},"maintainers":[{"name":"streamich","email":"streamich@dalecky.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/linkfs-2.1.0.tgz_1511986160781_0.6852718871086836"},"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":1511986163464,"_cnpm_publish_time":1511986163464,"dist-tags":{"latest":"2.1.0"}}