forked from enviPath/enviPy
Current Dev State
This commit is contained in:
21
static/js/ketcher2/node_modules/generate-object-property/LICENSE
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/generate-object-property/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Mathias Buus
|
||||
|
||||
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.
|
||||
19
static/js/ketcher2/node_modules/generate-object-property/README.md
generated
vendored
Normal file
19
static/js/ketcher2/node_modules/generate-object-property/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# generate-object-property
|
||||
|
||||
Generate safe JS code that can used to reference a object property
|
||||
|
||||
npm install generate-object-property
|
||||
|
||||
[](http://travis-ci.org/mafintosh/generate-object-property)
|
||||
|
||||
## Usage
|
||||
|
||||
``` js
|
||||
var gen = require('generate-object-property');
|
||||
console.log(gen('a','b')); // prints a.b
|
||||
console.log(gen('a', 'foo-bar')); // prints a["foo-bar"]
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
12
static/js/ketcher2/node_modules/generate-object-property/index.js
generated
vendored
Normal file
12
static/js/ketcher2/node_modules/generate-object-property/index.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
var isProperty = require('is-property')
|
||||
|
||||
var gen = function(obj, prop) {
|
||||
return isProperty(prop) ? obj+'.'+prop : obj+'['+JSON.stringify(prop)+']'
|
||||
}
|
||||
|
||||
gen.valid = isProperty
|
||||
gen.property = function (prop) {
|
||||
return isProperty(prop) ? prop : JSON.stringify(prop)
|
||||
}
|
||||
|
||||
module.exports = gen
|
||||
53
static/js/ketcher2/node_modules/generate-object-property/package.json
generated
vendored
Normal file
53
static/js/ketcher2/node_modules/generate-object-property/package.json
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"_from": "generate-object-property@^1.1.0",
|
||||
"_id": "generate-object-property@1.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
|
||||
"_location": "/generate-object-property",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "generate-object-property@^1.1.0",
|
||||
"name": "generate-object-property",
|
||||
"escapedName": "generate-object-property",
|
||||
"rawSpec": "^1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/is-my-json-valid"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
|
||||
"_shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0",
|
||||
"_spec": "generate-object-property@^1.1.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/is-my-json-valid",
|
||||
"author": {
|
||||
"name": "Mathias Buus",
|
||||
"url": "@mafintosh"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mafintosh/generate-object-property/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"is-property": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Generate safe JS code that can used to reference a object property",
|
||||
"devDependencies": {
|
||||
"tape": "^2.13.0"
|
||||
},
|
||||
"homepage": "https://github.com/mafintosh/generate-object-property",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "generate-object-property",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mafintosh/generate-object-property.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tape test.js"
|
||||
},
|
||||
"version": "1.2.0"
|
||||
}
|
||||
12
static/js/ketcher2/node_modules/generate-object-property/test.js
generated
vendored
Normal file
12
static/js/ketcher2/node_modules/generate-object-property/test.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
var tape = require('tape')
|
||||
var gen = require('./')
|
||||
|
||||
tape('valid', function(t) {
|
||||
t.same(gen('a', 'b'), 'a.b')
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('invalid', function(t) {
|
||||
t.same(gen('a', '-b'), 'a["-b"]')
|
||||
t.end()
|
||||
})
|
||||
Reference in New Issue
Block a user