{"_id":"file-reader","_rev":"35687","name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:07:45.000Z","created":"2014-10-12T13:01:13.484Z","1.1.1":"2016-04-23T22:24:30.891Z","1.1.0":"2016-04-23T05:06:19.509Z","1.0.0":"2015-01-21T23:36:40.971Z","0.2.2":"2014-11-02T09:02:39.243Z","0.2.1":"2014-11-02T08:48:32.016Z","0.2.0":"2014-11-02T08:41:00.922Z","0.1.1":"2014-10-18T03:47:07.066Z","0.1.0":"2014-10-12T13:01:13.484Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/file-reader.git"},"versions":{"1.1.1":{"name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","version":"1.1.1","homepage":"https://github.com/jonschlinkert/file-reader","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/file-reader.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"camel-case":"^1.2.2","extend-shallow":"^2.0.1","lazy-cache":"^1.0.4","map-files":"^0.8.0","read-yaml":"^1.0.0"},"devDependencies":{"gulp-format-md":"^0.1.8","js-yaml":"^3.6.0","mocha":"^2.4.5","should":"^8.3.1"},"keywords":["detect","file","format","fs","js","json","map","read","read-file","read-file-sync","reader","text","util","utils","yaml"],"verb":{"plugins":["gulp-format-md"],"reflinks":["verb"],"toc":false,"layout":"default","lint":{"reflinks":true},"tasks":["readme"],"related":{"list":["map-files","parse-filepath"]}},"gitHead":"7a3502d17c611150db5bb3901e5e6a6fc740a8bc","_id":"file-reader@1.1.1","_shasum":"383d131b4a7d58c77ec35366dcdadbd4757de8d6","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"383d131b4a7d58c77ec35366dcdadbd4757de8d6","size":3003,"noattachment":false,"key":"/file-reader/-/file-reader-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-reader/download/file-reader-1.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/file-reader-1.1.1.tgz_1461450269021_0.3458027942106128"},"directories":{},"publish_time":1461450270891,"_cnpm_publish_time":1461450270891,"_hasShrinkwrap":false},"1.1.0":{"name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","version":"1.1.0","homepage":"https://github.com/jonschlinkert/file-reader","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/file-reader.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"camel-case":"^1.2.2","extend-shallow":"^2.0.1","lazy-cache":"^1.0.4","map-files":"^0.8.0","read-yaml":"^1.0.0"},"devDependencies":{"gulp-format-md":"^0.1.8","js-yaml":"^3.6.0","should":"^8.3.1"},"keywords":["detect","file","format","fs","js","json","map","read","read-file","read-file-sync","reader","text","util","utils","yaml"],"verb":{"plugins":["gulp-format-md"],"reflinks":["verb"],"toc":false,"layout":"default","lint":{"reflinks":true},"tasks":["readme"],"related":{"list":["map-files","parse-filepath"]}},"gitHead":"7a3502d17c611150db5bb3901e5e6a6fc740a8bc","_id":"file-reader@1.1.0","_shasum":"623803a879377690d145fa20a12353e24ba0d16b","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"623803a879377690d145fa20a12353e24ba0d16b","size":2993,"noattachment":false,"key":"/file-reader/-/file-reader-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-reader/download/file-reader-1.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/file-reader-1.1.0.tgz_1461387977765_0.783661691006273"},"directories":{},"publish_time":1461387979509,"_cnpm_publish_time":1461387979509,"_hasShrinkwrap":false},"1.0.0":{"name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/file-reader","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/file-reader.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/file-reader/blob/master/LICENSE"},"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"extend-shallow":"^0.2.0","map-files":"^0.3.0","read-yaml":"^1.0.0"},"devDependencies":{"mocha":"*","should":"^4.6.1"},"keywords":["detect","file","format","fs","js","json","map","read","read-file","read-file-sync","reader","text","util","utils","yaml"],"gitHead":"c98ea29aa08a2298c0f3d180fd0227ab1800cfde","_id":"file-reader@1.0.0","_shasum":"be39600cc5a6d35b4e75a62e55b196e7f0727cea","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"be39600cc5a6d35b4e75a62e55b196e7f0727cea","size":2488,"noattachment":false,"key":"/file-reader/-/file-reader-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-reader/download/file-reader-1.0.0.tgz"},"directories":{},"publish_time":1421883400971,"_cnpm_publish_time":1421883400971,"_hasShrinkwrap":false},"0.2.2":{"name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","version":"0.2.2","homepage":"https://github.com/jonschlinkert/file-reader","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/file-reader.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/file-reader/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"keywords":["detect","file","format","fs","js","json","map","read","read-file","read-file-sync","reader","text","util","utils","yaml"],"dependencies":{"extend-shallow":"^0.1.1","fs-utils":"^0.6.0","map-files":"^0.2.0"},"_id":"file-reader@0.2.2","_shasum":"2d3ad81d4e2ab0b8da5c60730adeaf0b46766c21","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"2d3ad81d4e2ab0b8da5c60730adeaf0b46766c21","size":3725,"noattachment":false,"key":"/file-reader/-/file-reader-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-reader/download/file-reader-0.2.2.tgz"},"directories":{},"publish_time":1414918959243,"_cnpm_publish_time":1414918959243,"_hasShrinkwrap":false},"0.2.1":{"name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","version":"0.2.1","homepage":"https://github.com/jonschlinkert/file-reader","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/file-reader.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/file-reader/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"keywords":["detect","file","format","fs","js","json","map","read","read-file","read-file-sync","reader","text","util","utils","yaml"],"dependencies":{"extend-shallow":"^0.1.1","fs-utils":"^0.6.0","map-files":"^0.2.0"},"_id":"file-reader@0.2.1","_shasum":"399046a48592c5337610b717af8ea0a579924cf1","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"399046a48592c5337610b717af8ea0a579924cf1","size":3651,"noattachment":false,"key":"/file-reader/-/file-reader-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-reader/download/file-reader-0.2.1.tgz"},"directories":{},"publish_time":1414918112016,"_cnpm_publish_time":1414918112016,"_hasShrinkwrap":false},"0.2.0":{"name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/file-reader","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/file-reader.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/file-reader/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"keywords":["detect","file","format","fs","js","json","map","read","read-file","read-file-sync","reader","text","util","utils","yaml"],"dependencies":{"extend-shallow":"^0.1.1","fs-utils":"^0.6.0","map-files":"^0.2.0"},"_id":"file-reader@0.2.0","_shasum":"e325c79105c6df408f10cd926ca62e81c3982c07","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"e325c79105c6df408f10cd926ca62e81c3982c07","size":3650,"noattachment":false,"key":"/file-reader/-/file-reader-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-reader/download/file-reader-0.2.0.tgz"},"directories":{},"publish_time":1414917660922,"_cnpm_publish_time":1414917660922,"_hasShrinkwrap":false},"0.1.1":{"name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/file-reader","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/file-reader.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/file-reader/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"keywords":["detect","file","format","fs","js","json","map","read","read-file","read-file-sync","reader","text","util","utils","yaml"],"dependencies":{"fs-utils":"^0.5.0","map-files":"^0.2.0","mixin-object":"^0.1.1"},"_id":"file-reader@0.1.1","_shasum":"c9192d62e0abcfc42798ddbef35d3c92743585e6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c9192d62e0abcfc42798ddbef35d3c92743585e6","size":3574,"noattachment":false,"key":"/file-reader/-/file-reader-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-reader/download/file-reader-0.1.1.tgz"},"directories":{},"publish_time":1413604027066,"_cnpm_publish_time":1413604027066,"_hasShrinkwrap":false},"0.1.0":{"name":"file-reader","description":"Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/file-reader","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/file-reader.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/file-reader/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"keywords":[],"dependencies":{"fs-utils":"^0.5.0","map-files":"^0.2.0","mixin-object":"^0.1.1"},"_id":"file-reader@0.1.0","_shasum":"3678b60e1fc5f7293f877672fc4938f9c64dd1b0","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"3678b60e1fc5f7293f877672fc4938f9c64dd1b0","size":3518,"noattachment":false,"key":"/file-reader/-/file-reader-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-reader/download/file-reader-0.1.0.tgz"},"directories":{},"publish_time":1413118873484,"_cnpm_publish_time":1413118873484,"_hasShrinkwrap":false}},"readme":"# file-reader [![NPM version](https://img.shields.io/npm/v/file-reader.svg?style=flat)](https://www.npmjs.com/package/file-reader) [![NPM downloads](https://img.shields.io/npm/dm/file-reader.svg?style=flat)](https://npmjs.org/package/file-reader) [![Build Status](https://img.shields.io/travis/jonschlinkert/file-reader.svg?style=flat)](https://travis-ci.org/jonschlinkert/file-reader)\n\nRead a glob of files, dynamically choosing the reader or requiring the files based on the file extension.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install file-reader --save\n```\n\n## Usage\n\nRead a glob of files:\n\n```js\nvar read = require('file-reader');\n\nread('*.js');\n//=> { a: [Function: aaa], b: [Function: bbb], c: [Function: ccc] }\n\nread('*.txt');\n//=> { a: 'AAA', b: 'BBB', c: 'CCC' }\n\nread('*.{yml,json}');\n//=> { a: { a: 'a' }, b: { b: 'b' }, c: { c: 'c' } }\n```\n\nRead a single file (you must supply the full file path, no glob patterns):\n\n```js\nvar read = require('file-reader');\n\nread.file('a.js');\n//=> { a: [Function: foo] }\n\nread.file('a.txt');\n//=> { a: 'foo' }\n\nread('a.yml');\n//=> { a: { foo: 'bar' } }\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [map-files](https://www.npmjs.com/package/map-files): Return an object for a glob of files. Pass a `rename` function for the keys,… [more](https://www.npmjs.com/package/map-files) | [homepage](https://github.com/jonschlinkert/map-files)\n* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/file-reader/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/file-reader/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 23, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/file-reader","bugs":{"url":"https://github.com/jonschlinkert/file-reader/issues"},"license":"MIT"}