aboutsummaryrefslogtreecommitdiff
path: root/node_modules/for-own
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/for-own')
-rw-r--r--node_modules/for-own/LICENSE21
-rw-r--r--node_modules/for-own/README.md52
-rw-r--r--node_modules/for-own/index.js19
-rw-r--r--node_modules/for-own/package.json58
4 files changed, 150 insertions, 0 deletions
diff --git a/node_modules/for-own/LICENSE b/node_modules/for-own/LICENSE
new file mode 100644
index 000000000..fa30c4cb3
--- /dev/null
+++ b/node_modules/for-own/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2015, 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/for-own/README.md b/node_modules/for-own/README.md
new file mode 100644
index 000000000..16831ab7d
--- /dev/null
+++ b/node_modules/for-own/README.md
@@ -0,0 +1,52 @@
+# for-own [![NPM version](https://badge.fury.io/js/for-own.svg)](http://badge.fury.io/js/for-own)
+
+> Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`.
+
+## Install
+#### Install with [npm](https://www.npmjs.com/):
+
+```bash
+npm i for-own --save
+```
+
+## Run tests
+
+```bash
+npm test
+```
+
+## Usage
+
+```js
+var forOwn = require('for-own');
+
+var obj = {a: 'foo', b: 'bar', c: 'baz'};
+var values = [];
+var keys = [];
+
+forOwn(obj, function (value, key, o) {
+ keys.push(key);
+ values.push(value);
+});
+
+console.log(keys);
+//=> ['a', 'b', 'c'];
+
+console.log(values);
+//=> ['foo', 'bar', 'baz'];
+```
+
+## Author
+
+**Jon Schlinkert**
+
++ [github/jonschlinkert](https://github.com/jonschlinkert)
++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+## License
+Copyright (c) 2014 Jon Schlinkert, contributors.
+Released under the MIT license
+
+***
+
+_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 20, 2014._
diff --git a/node_modules/for-own/index.js b/node_modules/for-own/index.js
new file mode 100644
index 000000000..d07256c7c
--- /dev/null
+++ b/node_modules/for-own/index.js
@@ -0,0 +1,19 @@
+/*!
+ * for-own <https://github.com/jonschlinkert/for-own>
+ *
+ * Copyright (c) 2014-2016, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+
+'use strict';
+
+var forIn = require('for-in');
+var hasOwn = Object.prototype.hasOwnProperty;
+
+module.exports = function forOwn(o, fn, thisArg) {
+ forIn(o, function(val, key) {
+ if (hasOwn.call(o, key)) {
+ return fn.call(thisArg, o[key], key, o);
+ }
+ });
+};
diff --git a/node_modules/for-own/package.json b/node_modules/for-own/package.json
new file mode 100644
index 000000000..02ae917b3
--- /dev/null
+++ b/node_modules/for-own/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "for-own",
+ "description": "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.",
+ "version": "0.1.4",
+ "homepage": "https://github.com/jonschlinkert/for-own",
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "repository": "jonschlinkert/for-own",
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/for-own/issues"
+ },
+ "license": "MIT",
+ "files": [
+ "index.js"
+ ],
+ "main": "index.js",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "dependencies": {
+ "for-in": "^0.1.5"
+ },
+ "devDependencies": {
+ "gulp-format-md": "^0.1.7",
+ "mocha": "^2.4.5"
+ },
+ "keywords": [
+ "for-in",
+ "for-own",
+ "has",
+ "has-own",
+ "hasOwn",
+ "key",
+ "keys",
+ "object",
+ "own",
+ "value"
+ ],
+ "verb": {
+ "run": true,
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "reflinks": [
+ "verb"
+ ],
+ "lint": {
+ "reflinks": true
+ }
+ }
+}