summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/lazy-property
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2017-04-12 21:47:49 -0700
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2017-04-25 10:52:01 -0400
commit00842604483e4c2e622dfdb3a97440e07646158f (patch)
treef3346902636a44b6037652523767636bf7e4f2c9 /deps/npm/node_modules/lazy-property
parent061c5da010e0d249379618382a499840d38247b8 (diff)
downloadnode-new-00842604483e4c2e622dfdb3a97440e07646158f.tar.gz
deps: upgrade npm to 4.5.0
PR-URL: https://github.com/nodejs/node/pull/12480 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/lazy-property')
-rw-r--r--deps/npm/node_modules/lazy-property/.npmignore16
-rw-r--r--deps/npm/node_modules/lazy-property/LICENSE22
-rw-r--r--deps/npm/node_modules/lazy-property/README.md44
-rw-r--r--deps/npm/node_modules/lazy-property/component.json7
-rw-r--r--deps/npm/node_modules/lazy-property/lazyProperty.js19
-rw-r--r--deps/npm/node_modules/lazy-property/package.json91
6 files changed, 199 insertions, 0 deletions
diff --git a/deps/npm/node_modules/lazy-property/.npmignore b/deps/npm/node_modules/lazy-property/.npmignore
new file mode 100644
index 0000000000..038e0242eb
--- /dev/null
+++ b/deps/npm/node_modules/lazy-property/.npmignore
@@ -0,0 +1,16 @@
+lib-cov
+*.seed
+*.log
+*.csv
+*.dat
+*.out
+*.pid
+*.gz
+
+pids
+logs
+results
+
+npm-debug.log
+node_modules/*
+test/* \ No newline at end of file
diff --git a/deps/npm/node_modules/lazy-property/LICENSE b/deps/npm/node_modules/lazy-property/LICENSE
new file mode 100644
index 0000000000..8ce206a845
--- /dev/null
+++ b/deps/npm/node_modules/lazy-property/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2013 Mikola Lysenko
+
+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/deps/npm/node_modules/lazy-property/README.md b/deps/npm/node_modules/lazy-property/README.md
new file mode 100644
index 0000000000..d339c8f460
--- /dev/null
+++ b/deps/npm/node_modules/lazy-property/README.md
@@ -0,0 +1,44 @@
+lazy-property
+=============
+Adds a lazily initialized property to an object.
+
+## Example
+
+```javascript
+var addLazyProperty = require("lazy-property")
+
+var obj = {}
+
+addLazyProperty(obj, "foo", function() {
+ console.log("initialized!")
+ return "bar"
+})
+
+//Access the property
+console.log(obj.foo)
+console.log(obj.foo)
+
+//Prints out:
+//
+// initialized!
+// bar
+// bar
+//
+```
+
+## Install
+
+ npm install lazy-property
+
+## API
+
+### `require("lazy-property")(obj, name, init[, enumerable])`
+Adds a lazily initialized property to the object.
+
+* `obj` is the object to add the property to
+* `name` is the name of the property
+* `init` is a function that computes the value of the property
+* `enumerable` if the property is enumerable (default `false`)
+
+## Credits
+(c) 2013 Mikola Lysenko. MIT License
diff --git a/deps/npm/node_modules/lazy-property/component.json b/deps/npm/node_modules/lazy-property/component.json
new file mode 100644
index 0000000000..142938e496
--- /dev/null
+++ b/deps/npm/node_modules/lazy-property/component.json
@@ -0,0 +1,7 @@
+{
+ "name": "lazy-property",
+ "version": "0.0.2",
+ "description": "Lazily initialized properties for objects",
+ "main": "lazyProperty.js",
+ "scripts": ["lazyProperty.js"]
+}
diff --git a/deps/npm/node_modules/lazy-property/lazyProperty.js b/deps/npm/node_modules/lazy-property/lazyProperty.js
new file mode 100644
index 0000000000..20e5fe1912
--- /dev/null
+++ b/deps/npm/node_modules/lazy-property/lazyProperty.js
@@ -0,0 +1,19 @@
+"use strict"
+
+function addLazyProperty(object, name, initializer, enumerable) {
+ Object.defineProperty(object, name, {
+ get: function() {
+ var v = initializer.call(this)
+ Object.defineProperty(this, name, { value: v, enumerable: !!enumerable, writable: true })
+ return v
+ },
+ set: function(v) {
+ Object.defineProperty(this, name, { value: v, enumerable: !!enumerable, writable: true })
+ return v
+ },
+ enumerable: !!enumerable,
+ configurable: true
+ })
+}
+
+module.exports = addLazyProperty
diff --git a/deps/npm/node_modules/lazy-property/package.json b/deps/npm/node_modules/lazy-property/package.json
new file mode 100644
index 0000000000..a11a940768
--- /dev/null
+++ b/deps/npm/node_modules/lazy-property/package.json
@@ -0,0 +1,91 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "lazy-property",
+ "scope": null,
+ "escapedName": "lazy-property",
+ "name": "lazy-property",
+ "rawSpec": "",
+ "spec": "latest",
+ "type": "tag"
+ },
+ "/Users/rebecca/code/npm"
+ ]
+ ],
+ "_from": "lazy-property@latest",
+ "_id": "lazy-property@1.0.0",
+ "_inCache": true,
+ "_location": "/lazy-property",
+ "_npmUser": {
+ "name": "mikolalysenko",
+ "email": "mikolalysenko@gmail.com"
+ },
+ "_npmVersion": "1.4.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "lazy-property",
+ "scope": null,
+ "escapedName": "lazy-property",
+ "name": "lazy-property",
+ "rawSpec": "",
+ "spec": "latest",
+ "type": "tag"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/lazy-property/-/lazy-property-1.0.0.tgz",
+ "_shasum": "84ddc4b370679ba8bd4cdcfa4c06b43d57111147",
+ "_shrinkwrap": null,
+ "_spec": "lazy-property",
+ "_where": "/Users/rebecca/code/npm",
+ "author": {
+ "name": "Mikola Lysenko"
+ },
+ "bugs": {
+ "url": "https://github.com/mikolalysenko/lazy-property/issues"
+ },
+ "dependencies": {},
+ "description": "Lazily initialized properties for objects",
+ "devDependencies": {
+ "tape": "^2.12.3"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "dist": {
+ "shasum": "84ddc4b370679ba8bd4cdcfa4c06b43d57111147",
+ "tarball": "https://registry.npmjs.org/lazy-property/-/lazy-property-1.0.0.tgz"
+ },
+ "gitHead": "850a27f710ec72f05b534805c31f095ff590f1ea",
+ "homepage": "https://github.com/mikolalysenko/lazy-property",
+ "keywords": [
+ "lazy",
+ "property",
+ "object",
+ "initialize",
+ "array",
+ "dictionary"
+ ],
+ "license": "MIT",
+ "main": "lazyProperty.js",
+ "maintainers": [
+ {
+ "name": "mikolalysenko",
+ "email": "mikolalysenko@gmail.com"
+ }
+ ],
+ "name": "lazy-property",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mikolalysenko/lazy-property.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "version": "1.0.0"
+}