JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1934
  • Score
    100M100P100Q116507F

Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.

Package Exports

  • file-reader

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (file-reader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

file-reader NPM version

Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.

Install

Install with npm:

npm i file-reader --save-dev

Run tests

npm test

Usage

var reader = require('file-reader');

console.log(reader('*.js'));
//=> { a: [Function: aaa], b: [Function: bbb], c: [Function: ccc] }

console.log(reader('*.txt'));
//=> { a: 'AAA', b: 'BBB', c: 'CCC' }

console.log(reader('*.{yml,json}'));
//=> { a: { a: 'a' }, b: { b: 'b' }, c: { c: 'c' } }

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on November 02, 2014.