You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this great module!
However, the API example code from the readme doesn't work, because the module exports an object with one method, instead of a function:
$ nodever fs-read-data
require('fs-read-data/package.json').version = 1.0.4
Node.js v8.12.0, npm v6.4.1, Ubuntu 14.04.5 LTS trusty,
kernel: 3.13.0-154-generic, machine/CPU/platform: i686 i686 i686
$ nodejs
> const read = require('fs-read-data');
undefined
> const data = read('package.json');
TypeError: read is not a function
>read
{ readFile: [Function] }
I'd prefer the function be exported directly. For compatibility, the function should get a readFile property with a self-reference until the next major version bump.
The text was updated successfully, but these errors were encountered:
A while ago I made an alias package read-data-file, primarily in hopes npm would show me what I'm looking for each time I search for "read data file". Nowadays it finally does, somewhat. Still buried below a lot of other packages, but at least on page 1 of results. That's probably as good as npm search can get.
Thanks for this great module!
However, the API example code from the readme doesn't work, because the module exports an object with one method, instead of a function:
I'd prefer the function be exported directly. For compatibility, the function should get a
readFile
property with a self-reference until the next major version bump.The text was updated successfully, but these errors were encountered: