Comparing version 0.1.1 to 0.1.2
'use strict'; | ||
var visit = require('object-visit'); | ||
var utils = require('./utils'); | ||
@@ -14,2 +14,6 @@ /** | ||
module.exports = function mapVisit(collection, method, arr) { | ||
if (!Array.isArray(arr)) { | ||
throw new TypeError('expected an array'); | ||
} | ||
arr.forEach(function (val) { | ||
@@ -19,5 +23,5 @@ if (typeof val === 'string') { | ||
} else { | ||
visit(collection, method, val); | ||
utils.visit(collection, method, val); | ||
} | ||
}); | ||
}; |
{ | ||
"name": "map-visit", | ||
"description": "Map `visit` over an array of objects.", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"homepage": "https://github.com/jonschlinkert/map-visit", | ||
@@ -13,3 +13,4 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"files": [ | ||
"index.js" | ||
"index.js", | ||
"utils.js" | ||
], | ||
@@ -24,2 +25,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"lazy-cache": "^0.2.3", | ||
"object-visit": "^0.1.0" | ||
@@ -26,0 +28,0 @@ }, |
@@ -100,4 +100,4 @@ # map-visit [![NPM version](https://badge.fury.io/js/map-visit.svg)](http://badge.fury.io/js/map-visit) | ||
* [collection-visit](https://github.com/jonschlinkert/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | ||
* [object-visit](https://github.com/jonschlinkert/object-visit): Call the given method on each value in the given object. | ||
* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://www.npmjs.com/package/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit) | ||
* [object-visit](https://www.npmjs.com/package/object-visit): Call the given method on each value in the given object. | [homepage](https://github.com/jonschlinkert/object-visit) | ||
@@ -114,3 +114,3 @@ ## Running tests | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-visit/issues/new) | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-visit/issues/new). | ||
@@ -131,2 +131,2 @@ ## Author | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 07, 2015._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 06, 2015._ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6212
5
29
2
+ Addedlazy-cache@^0.2.3
+ Addedlazy-cache@0.2.7(transitive)