Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

file-reader

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-reader - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

24

index.js

@@ -17,13 +17,15 @@ /*!

module.exports = function (patterns, options) {
return mapFiles(patterns, merge({}, options, {
name: function camelize(fp) {
var str = path.basename(fp, path.extname(fp));
return str.replace(/-(.)/, function (_, s) {
return s.toUpperCase();
});
},
read: function read(fp) {
return reader(path.extname(fp))(path.resolve(fp));
}
}));
options = merge({name: camelize, read: read}, options);
return mapFiles(patterns, options);
};
function camelize(fp) {
var str = path.basename(fp, path.extname(fp));
return str.replace(/-(.)/, function (_, s) {
return s.toUpperCase();
});
}
function read(fp) {
return reader(path.extname(fp))(path.resolve(fp));
}
{
"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",
"version": "0.1.1",
"homepage": "https://github.com/jonschlinkert/file-reader",

@@ -35,3 +35,19 @@ "author": {

},
"keywords": [],
"keywords": [
"detect",
"file",
"format",
"fs",
"js",
"json",
"map",
"read",
"read-file",
"read-file-sync",
"reader",
"text",
"util",
"utils",
"yaml"
],
"dependencies": {

@@ -42,2 +58,2 @@ "fs-utils": "^0.5.0",

}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc