diff options
Diffstat (limited to 'node_modules/object-visit')
-rw-r--r-- | node_modules/object-visit/LICENSE | 2 | ||||
-rw-r--r-- | node_modules/object-visit/README.md | 52 | ||||
-rw-r--r-- | node_modules/object-visit/index.js | 11 | ||||
-rw-r--r-- | node_modules/object-visit/node_modules/isobject/LICENSE | 21 | ||||
-rw-r--r-- | node_modules/object-visit/node_modules/isobject/README.md | 112 | ||||
-rw-r--r-- | node_modules/object-visit/node_modules/isobject/index.js | 14 | ||||
-rw-r--r-- | node_modules/object-visit/node_modules/isobject/package.json | 67 | ||||
-rw-r--r-- | node_modules/object-visit/package.json | 31 |
8 files changed, 61 insertions, 249 deletions
diff --git a/node_modules/object-visit/LICENSE b/node_modules/object-visit/LICENSE index 65f90aca8..ec85897eb 100644 --- a/node_modules/object-visit/LICENSE +++ b/node_modules/object-visit/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015, Jon Schlinkert. +Copyright (c) 2015, 2017, Jon Schlinkert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/object-visit/README.md b/node_modules/object-visit/README.md index 14d577c09..64015cb9a 100644 --- a/node_modules/object-visit/README.md +++ b/node_modules/object-visit/README.md @@ -1,13 +1,13 @@ -# object-visit [](http://badge.fury.io/js/object-visit) [](https://travis-ci.org/jonschlinkert/object-visit) +# object-visit [](https://www.npmjs.com/package/object-visit) [](https://npmjs.org/package/object-visit) [](https://npmjs.org/package/object-visit) [](https://travis-ci.org/jonschlinkert/object-visit) > Call a specified method on each value in the given object. ## Install -Install with [npm](https://www.npmjs.com/) +Install with [npm](https://www.npmjs.com/): ```sh -$ npm i object-visit --save +$ npm install --save object-visit ``` ## Usage @@ -35,37 +35,49 @@ console.log(ctx.data); //=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }}; ``` -## Related projects +## About -* [base-methods](https://www.npmjs.com/package/base-methods): Starter for creating a node.js application with a handful of common methods, like `set`, `get`,… [more](https://www.npmjs.com/package/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods) -* [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) -* [define-property](https://www.npmjs.com/package/define-property): Define a non-enumerable property on an object. | [homepage](https://github.com/jonschlinkert/define-property) -* [map-visit](https://www.npmjs.com/package/map-visit): Map `visit` over an array of objects. | [homepage](https://github.com/jonschlinkert/map-visit) +### Related projects -## Running tests +* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/jonschlinkert/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods "base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [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://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [define-property](https://www.npmjs.com/package/define-property): Define a non-enumerable property on an object. | [homepage](https://github.com/jonschlinkert/define-property "Define a non-enumerable property on an object.") +* [map-visit](https://www.npmjs.com/package/map-visit): Map `visit` over an array of objects. | [homepage](https://github.com/jonschlinkert/map-visit "Map `visit` over an array of objects.") -Install dev dependencies: +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: ```sh -$ npm i -d && npm test +$ npm install -g verbose/verb#dev verb-generate-readme && verb ``` -## Contributing +### Running tests -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/object-visit/issues/new). +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` -## Author +### Author **Jon Schlinkert** -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) -## License +### License -Copyright © 2015 Jon Schlinkert -Released under the MIT license. +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). *** -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 09, 2015._
\ No newline at end of file +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 30, 2017._
\ No newline at end of file diff --git a/node_modules/object-visit/index.js b/node_modules/object-visit/index.js index 50b5800e7..fcaeda925 100644 --- a/node_modules/object-visit/index.js +++ b/node_modules/object-visit/index.js @@ -1,15 +1,15 @@ /*! * object-visit <https://github.com/jonschlinkert/object-visit> * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. */ 'use strict'; var isObject = require('isobject'); -module.exports = function visit(thisArg, method, target) { +module.exports = function visit(thisArg, method, target, val) { if (!isObject(thisArg) && typeof thisArg !== 'function') { throw new Error('object-visit expects `thisArg` to be an object.'); } @@ -22,9 +22,12 @@ module.exports = function visit(thisArg, method, target) { return thisArg; } + var args = [].slice.call(arguments, 3); target = target || {}; + for (var key in target) { - thisArg[method](key, target[key]); + var arr = [key, target[key]].concat(args); + thisArg[method].apply(thisArg, arr); } return thisArg; }; diff --git a/node_modules/object-visit/node_modules/isobject/LICENSE b/node_modules/object-visit/node_modules/isobject/LICENSE deleted file mode 100644 index 39245ac1c..000000000 --- a/node_modules/object-visit/node_modules/isobject/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/object-visit/node_modules/isobject/README.md b/node_modules/object-visit/node_modules/isobject/README.md deleted file mode 100644 index 9dd897aa0..000000000 --- a/node_modules/object-visit/node_modules/isobject/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# isobject [](https://www.npmjs.com/package/isobject) [](https://npmjs.org/package/isobject) [](https://travis-ci.org/jonschlinkert/isobject) - -Returns true if the value is an object and not an array or null. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install isobject --save -``` - -Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install isobject -``` - -Install with [bower](http://bower.io/) - -```sh -$ bower install isobject -``` - -## Usage - -```js -var isObject = require('isobject'); -``` - -**True** - -All of the following return `true`: - -```js -isObject({}); -isObject(Object.create({})); -isObject(Object.create(Object.prototype)); -isObject(Object.create(null)); -isObject({}); -isObject(new Foo); -isObject(/foo/); -``` - -**False** - -All of the following return `false`: - -```js -isObject(); -isObject(function () {}); -isObject(1); -isObject([]); -isObject(undefined); -isObject(null); -``` - -## Related projects - -You might also be interested in these projects: - -[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) - -* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) -* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object) -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/isobject/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._
\ No newline at end of file diff --git a/node_modules/object-visit/node_modules/isobject/index.js b/node_modules/object-visit/node_modules/isobject/index.js deleted file mode 100644 index aa0dce0bb..000000000 --- a/node_modules/object-visit/node_modules/isobject/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/*! - * isobject <https://github.com/jonschlinkert/isobject> - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isArray = require('isarray'); - -module.exports = function isObject(val) { - return val != null && typeof val === 'object' && isArray(val) === false; -}; diff --git a/node_modules/object-visit/node_modules/isobject/package.json b/node_modules/object-visit/node_modules/isobject/package.json deleted file mode 100644 index 954f4113f..000000000 --- a/node_modules/object-visit/node_modules/isobject/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "isobject", - "description": "Returns true if the value is an object and not an array or null.", - "version": "2.1.0", - "homepage": "https://github.com/jonschlinkert/isobject", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "repository": "jonschlinkert/isobject", - "bugs": { - "url": "https://github.com/jonschlinkert/isobject/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "isarray": "1.0.0" - }, - "devDependencies": { - "gulp-format-md": "^0.1.9", - "mocha": "^2.4.5" - }, - "keywords": [ - "check", - "is", - "is-object", - "isobject", - "kind", - "kind-of", - "kindof", - "native", - "object", - "type", - "typeof", - "value" - ], - "verb": { - "related": { - "list": [ - "merge-deep", - "extend-shallow", - "is-plain-object", - "kind-of" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "reflinks": [ - "verb" - ] - } -} diff --git a/node_modules/object-visit/package.json b/node_modules/object-visit/package.json index 9fcd5f0f1..15fd0ff8d 100644 --- a/node_modules/object-visit/package.json +++ b/node_modules/object-visit/package.json @@ -1,7 +1,7 @@ { "name": "object-visit", "description": "Call a specified method on each value in the given object.", - "version": "0.3.4", + "version": "1.0.1", "homepage": "https://github.com/jonschlinkert/object-visit", "author": "Jon Schlinkert (https://github.com/jonschlinkert)", "repository": "jonschlinkert/object-visit", @@ -20,15 +20,15 @@ "test": "mocha" }, "dependencies": { - "isobject": "^2.0.0" + "isobject": "^3.0.0" }, "devDependencies": { - "gulp": "^3.9.0", - "gulp-eslint": "^1.0.0", - "gulp-istanbul": "^0.10.1", - "gulp-mocha": "^2.1.3", - "mocha": "*", - "should": "*" + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.0", + "mocha": "^3.2.0" }, "keywords": [ "context", @@ -44,11 +44,22 @@ "verb": { "related": { "list": [ + "base-methods", "collection-visit", - "map-visit", "define-property", - "base-methods" + "map-visit" ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true } } } |