# add dist

This commit is contained in:
Mario Romano
2016-04-21 11:56:31 +01:00
parent 5914688467
commit 07807e7bc3
13499 changed files with 1808930 additions and 5 deletions

View 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.

View 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
[![build status](http://img.shields.io/travis/mafintosh/generate-object-property.svg?style=flat)](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

View 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

View File

@@ -0,0 +1,76 @@
{
"_args": [
[
"generate-object-property@^1.1.0",
"/Users/mromano/dev/dev-platform-webcomponents/ng2-components/ng2-alfresco-documentslist/node_modules/is-my-json-valid"
]
],
"_from": "generate-object-property@>=1.1.0 <2.0.0",
"_id": "generate-object-property@1.2.0",
"_inCache": true,
"_installable": true,
"_location": "/generate-object-property",
"_nodeVersion": "2.0.1",
"_npmUser": {
"email": "mathiasbuus@gmail.com",
"name": "mafintosh"
},
"_npmVersion": "2.9.0",
"_phantomChildren": {},
"_requested": {
"name": "generate-object-property",
"raw": "generate-object-property@^1.1.0",
"rawSpec": "^1.1.0",
"scope": null,
"spec": ">=1.1.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/is-my-json-valid"
],
"_resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
"_shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0",
"_shrinkwrap": null,
"_spec": "generate-object-property@^1.1.0",
"_where": "/Users/mromano/dev/dev-platform-webcomponents/ng2-components/ng2-alfresco-documentslist/node_modules/is-my-json-valid",
"author": {
"name": "Mathias Buus",
"url": "@mafintosh"
},
"bugs": {
"url": "https://github.com/mafintosh/generate-object-property/issues"
},
"dependencies": {
"is-property": "^1.0.0"
},
"description": "Generate safe JS code that can used to reference a object property",
"devDependencies": {
"tape": "^2.13.0"
},
"directories": {},
"dist": {
"shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0",
"tarball": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz"
},
"gitHead": "0dd7d411018de54b2eae63b424c15b3e50bd678c",
"homepage": "https://github.com/mafintosh/generate-object-property",
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"email": "mathiasbuus@gmail.com",
"name": "mafintosh"
}
],
"name": "generate-object-property",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/mafintosh/generate-object-property.git"
},
"scripts": {
"test": "tape test.js"
},
"version": "1.2.0"
}

View 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()
})