forked from enviPath/enviPy
Current Dev State
This commit is contained in:
15
static/js/ketcher2/node_modules/own-or/LICENSE
generated
vendored
Normal file
15
static/js/ketcher2/node_modules/own-or/LICENSE
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
20
static/js/ketcher2/node_modules/own-or/README.md
generated
vendored
Normal file
20
static/js/ketcher2/node_modules/own-or/README.md
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# own-or
|
||||
|
||||
Either use the object's own property, or a fallback
|
||||
|
||||
Useful for setting default values.
|
||||
|
||||
## API
|
||||
|
||||
`ownOr(object, key, fallback)`
|
||||
|
||||
## USAGE
|
||||
|
||||
```js
|
||||
var ownOr = require('own-or')
|
||||
|
||||
var config = { some: 'configs' }
|
||||
|
||||
var foo = ownOr(config, 'bar', 'baz') // 'baz'
|
||||
var some = ownOr(config, 'some', 'quux') // 'configs'
|
||||
```
|
||||
6
static/js/ketcher2/node_modules/own-or/own-or.js
generated
vendored
Normal file
6
static/js/ketcher2/node_modules/own-or/own-or.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = function ownOr (object, field, fallback) {
|
||||
if (Object.prototype.hasOwnProperty.call(object, field))
|
||||
return object[field]
|
||||
else
|
||||
return fallback
|
||||
}
|
||||
48
static/js/ketcher2/node_modules/own-or/package.json
generated
vendored
Normal file
48
static/js/ketcher2/node_modules/own-or/package.json
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"_from": "own-or@^1.0.0",
|
||||
"_id": "own-or@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=",
|
||||
"_location": "/own-or",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "own-or@^1.0.0",
|
||||
"name": "own-or",
|
||||
"escapedName": "own-or",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/tap"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz",
|
||||
"_shasum": "4e877fbeda9a2ec8000fbc0bcae39645ee8bf8dc",
|
||||
"_spec": "own-or@^1.0.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/tap",
|
||||
"author": {
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/own-or/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Either use the object's own property, or a fallback",
|
||||
"homepage": "https://github.com/isaacs/own-or#readme",
|
||||
"license": "ISC",
|
||||
"main": "own-or.js",
|
||||
"name": "own-or",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/isaacs/own-or.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
14
static/js/ketcher2/node_modules/own-or/test.js
generated
vendored
Normal file
14
static/js/ketcher2/node_modules/own-or/test.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
var ownOr = require('./')
|
||||
var assert = require('assert')
|
||||
|
||||
var foo = { bar: 'baz' }
|
||||
|
||||
assert.equal(ownOr(foo, 'bar', 'boo'), 'baz')
|
||||
assert.equal(ownOr(foo, 'boo', 'boo'), 'boo')
|
||||
|
||||
var bar = Object.create(foo)
|
||||
bar.bat = 'boo'
|
||||
assert.equal(ownOr(bar, 'bar', 'boo'), 'boo')
|
||||
assert.equal(ownOr(bar, 'bat', 'qux'), 'boo')
|
||||
|
||||
console.log('TAP version 13\nok\n1..1')
|
||||
Reference in New Issue
Block a user