Initial
This commit is contained in:
21
resources/app/node_modules/merge-descriptors/HISTORY.md
generated
vendored
Normal file
21
resources/app/node_modules/merge-descriptors/HISTORY.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
1.0.1 / 2016-01-17
|
||||
==================
|
||||
|
||||
* perf: enable strict mode
|
||||
|
||||
1.0.0 / 2015-03-01
|
||||
==================
|
||||
|
||||
* Add option to only add new descriptors
|
||||
* Add simple argument validation
|
||||
* Add jsdoc to source file
|
||||
|
||||
0.0.2 / 2013-12-14
|
||||
==================
|
||||
|
||||
* Move repository to `component` organization
|
||||
|
||||
0.0.1 / 2013-10-29
|
||||
==================
|
||||
|
||||
* Initial release
|
||||
23
resources/app/node_modules/merge-descriptors/LICENSE
generated
vendored
Normal file
23
resources/app/node_modules/merge-descriptors/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
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.
|
||||
60
resources/app/node_modules/merge-descriptors/index.js
generated
vendored
Normal file
60
resources/app/node_modules/merge-descriptors/index.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/*!
|
||||
* merge-descriptors
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @public
|
||||
*/
|
||||
|
||||
module.exports = merge
|
||||
|
||||
/**
|
||||
* Module variables.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
|
||||
/**
|
||||
* Merge the property descriptors of `src` into `dest`
|
||||
*
|
||||
* @param {object} dest Object to add descriptors to
|
||||
* @param {object} src Object to clone descriptors from
|
||||
* @param {boolean} [redefine=true] Redefine `dest` properties with `src` properties
|
||||
* @returns {object} Reference to dest
|
||||
* @public
|
||||
*/
|
||||
|
||||
function merge(dest, src, redefine) {
|
||||
if (!dest) {
|
||||
throw new TypeError('argument dest is required')
|
||||
}
|
||||
|
||||
if (!src) {
|
||||
throw new TypeError('argument src is required')
|
||||
}
|
||||
|
||||
if (redefine === undefined) {
|
||||
// Default to true
|
||||
redefine = true
|
||||
}
|
||||
|
||||
Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName(name) {
|
||||
if (!redefine && hasOwnProperty.call(dest, name)) {
|
||||
// Skip desriptor
|
||||
return
|
||||
}
|
||||
|
||||
// Copy descriptor
|
||||
var descriptor = Object.getOwnPropertyDescriptor(src, name)
|
||||
Object.defineProperty(dest, name, descriptor)
|
||||
})
|
||||
|
||||
return dest
|
||||
}
|
||||
23
resources/app/node_modules/merge-descriptors/package.json
generated
vendored
Normal file
23
resources/app/node_modules/merge-descriptors/package.json
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "merge-descriptors",
|
||||
"description": "Merge objects using descriptors",
|
||||
"version": "1.0.1",
|
||||
"author": {
|
||||
"name": "Jonathan Ong",
|
||||
"email": "me@jongleberry.com",
|
||||
"url": "http://jongleberry.com",
|
||||
"twitter": "https://twitter.com/jongleberry"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": "component/merge-descriptors",
|
||||
"devDependencies": {
|
||||
"istanbul": "0.4.1",
|
||||
"mocha": "1.21.5"
|
||||
},
|
||||
"files": [
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"index.js"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user