Socket
Socket
Sign inDemoInstall

map-files

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

map-files - npm Package Compare versions

Comparing version 0.6.2 to 0.7.1

5

index.js

@@ -10,2 +10,3 @@ 'use strict';

var globby = require('globby');
var isGlob = require('is-glob');

@@ -67,3 +68,5 @@ /**

function glob(patterns, opts) {
if (!isGlob(patterns)) { return [patterns]; }
opts = opts || {};
if (typeof opts.glob === 'function') {

@@ -84,3 +87,3 @@ return opts.glob(patterns, opts);

function name(fp, acc, opts) {
var fn = (opts && opts.name) || opts.renameKey;
var fn = opts && (opts.name || opts.renameKey);
if (typeof fn === 'function') {

@@ -87,0 +90,0 @@ return fn(fp, acc, opts);

17

package.json
{
"name": "map-files",
"description": "Return an object for a glob of files. Pass a `rename` function for the keys, or a `parse` function for the content, allowing it to be used for readable or require-able files.",
"version": "0.6.2",
"version": "0.7.1",
"homepage": "https://github.com/jonschlinkert/map-files",

@@ -10,7 +10,13 @@ "author": {

},
"repository": "jonschlinkert/map-files",
"repository": {
"type": "git",
"url": "https://github.com/jonschlinkert/map-files.git"
},
"bugs": {
"url": "https://github.com/jonschlinkert/map-files/issues"
},
"license": "MIT",
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/map-files/blob/master/LICENSE-MIT"
},
"files": [

@@ -27,3 +33,4 @@ "index.js"

"dependencies": {
"globby": "^1.1.0"
"globby": "^1.2.0",
"is-glob": "^1.1.3"
},

@@ -55,2 +62,2 @@ "devDependencies": {

]
}
}

@@ -13,10 +13,2 @@ # map-files [![NPM version](https://badge.fury.io/js/map-files.svg)](http://badge.fury.io/js/map-files) [![Build Status](https://travis-ci.org/jonschlinkert/map-files.svg)](https://travis-ci.org/jonschlinkert/map-files)

## Running tests
Install dev dependencies.
```bash
npm i -d && npm test
```
## Usage

@@ -102,3 +94,18 @@

## Other files libs
* [file-reader](https://github.com/jonschlinkert/file-reader): Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.
* [filter-files](https://github.com/jonschlinkert/filter-files): Recursively read directories and return a list of files, filtered to have only the files for which the (optional) filter function returns `true`. Sync and async.
* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch (10-45x faster on avg). Just use `minimatch.isMatch()` instead of `multimatch()` or `minimatch()`.
* [export-files](https://github.com/jonschlinkert/export-files): node.js utility for exporting a directory of files as modules.
## Running tests
Install dev dependencies.
```bash
npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-files/issues)
## Author

@@ -117,4 +124,4 @@

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 01, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 22, 2015._
[globby]: https://github.com/sindresorhus/globby
[globby]: https://github.com/sindresorhus/globby
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