Skip to content
Snippets Groups Projects
Commit 2be41b82 authored by Mari Teiler-Johnsen's avatar Mari Teiler-Johnsen
Browse files

.

parent 9820fd1c
No related branches found
No related tags found
No related merge requests found
Pipeline #23043 passed
Showing
with 0 additions and 1013 deletions
# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow)
> Extend an object with the properties of additional objects. node.js/javascript util.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i extend-shallow --save
```
## Usage
```js
var extend = require('extend-shallow');
extend({a: 'b'}, {c: 'd'})
//=> {a: 'b', c: 'd'}
```
Pass an empty object to shallow clone:
```js
var obj = {};
extend(obj, {a: 'b'}, {c: 'd'})
//=> {a: 'b', c: 'd'}
```
## Related
* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util.
* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own)
* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in)
* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor.
* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null.
* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value.
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._
\ No newline at end of file
{
"_from": "append-transform@^0.4.0",
"_id": "append-transform@0.4.0",
"_inBundle": false,
"_integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=",
"_location": "/append-transform",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "append-transform@^0.4.0",
"name": "append-transform",
"escapedName": "append-transform",
"rawSpec": "^0.4.0",
"saveSpec": null,
"fetchSpec": "^0.4.0"
},
"_requiredBy": [
"/istanbul-lib-hook"
],
"_resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz",
"_shasum": "d76ebf8ca94d276e247a36bad44a4b74ab611991",
"_spec": "append-transform@^0.4.0",
"_where": "/Users/maritj/Documents/Documents/Dataing2ndyear/Systemutvikling2/Ovinger/Oving5/DatabaseTest/node_modules/istanbul-lib-hook",
"author": {
"name": "James Talmage",
"email": "james@talmage.io",
"url": "github.com/jamestalmage"
},
"bugs": {
"url": "https://github.com/jamestalmage/append-transform/issues"
},
"bundleDependencies": false,
"dependencies": {
"default-require-extensions": "^1.0.0"
},
"deprecated": false,
"description": "Install a transform to `require.extensions` that always runs last, even if additional extensions are added later.",
"devDependencies": {
"ava": "^0.7.0",
"coveralls": "^2.11.6",
"fake-module-system": "^0.3.0",
"nyc": "^4.0.1",
"xo": "^0.11.2"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jamestalmage/append-transform#readme",
"keywords": [
"transform",
"require",
"append",
"last",
"coverage",
"source-map",
"extension",
"module"
],
"license": "MIT",
"name": "append-transform",
"repository": {
"type": "git",
"url": "git+https://github.com/jamestalmage/append-transform.git"
},
"scripts": {
"test": "xo && nyc --reporter=lcov --reporter=text ava"
},
"version": "0.4.0",
"xo": {
"ignores": [
"test.js"
]
}
}
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = asyncify;
var _isObject = require('lodash/isObject');
var _isObject2 = _interopRequireDefault(_isObject);
var _initialParams = require('./internal/initialParams');
var _initialParams2 = _interopRequireDefault(_initialParams);
var _setImmediate = require('./internal/setImmediate');
var _setImmediate2 = _interopRequireDefault(_setImmediate);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Take a sync function and make it async, passing its return value to a
* callback. This is useful for plugging sync functions into a waterfall,
* series, or other async functions. Any arguments passed to the generated
* function will be passed to the wrapped function (except for the final
* callback argument). Errors thrown will be passed to the callback.
*
* If the function passed to `asyncify` returns a Promise, that promises's
* resolved/rejected state will be used to call the callback, rather than simply
* the synchronous return value.
*
* This also means you can asyncify ES2017 `async` functions.
*
* @name asyncify
* @static
* @memberOf module:Utils
* @method
* @alias wrapSync
* @category Util
* @param {Function} func - The synchronous function, or Promise-returning
* function to convert to an {@link AsyncFunction}.
* @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
* invoked with `(args..., callback)`.
* @example
*
* // passing a regular synchronous function
* async.waterfall([
* async.apply(fs.readFile, filename, "utf8"),
* async.asyncify(JSON.parse),
* function (data, next) {
* // data is the result of parsing the text.
* // If there was a parsing error, it would have been caught.
* }
* ], callback);
*
* // passing a function returning a promise
* async.waterfall([
* async.apply(fs.readFile, filename, "utf8"),
* async.asyncify(function (contents) {
* return db.model.create(contents);
* }),
* function (model, next) {
* // `model` is the instantiated model object.
* // If there was an error, this function would be skipped.
* }
* ], callback);
*
* // es2017 example, though `asyncify` is not needed if your JS environment
* // supports async functions out of the box
* var q = async.queue(async.asyncify(async function(file) {
* var intermediateStep = await processFile(file);
* return await somePromise(intermediateStep)
* }));
*
* q.push(files);
*/
function asyncify(func) {
return (0, _initialParams2.default)(function (args, callback) {
var result;
try {
result = func.apply(this, args);
} catch (e) {
return callback(e);
}
// if result is Promise object
if ((0, _isObject2.default)(result) && typeof result.then === 'function') {
result.then(function (value) {
invokeCallback(callback, null, value);
}, function (err) {
invokeCallback(callback, err.message ? err : new Error(err));
});
} else {
callback(null, result);
}
});
}
function invokeCallback(callback, error, value) {
try {
callback(error, value);
} catch (e) {
(0, _setImmediate2.default)(rethrow, e);
}
}
function rethrow(error) {
throw error;
}
module.exports = exports['default'];
\ No newline at end of file
module.exports = { "default": require("core-js/library/fn/array/slice"), __esModule: true };
\ No newline at end of file
module.exports = require("./slicedToArrayLoose.js");
\ No newline at end of file
This diff is collapsed.
require('../modules/es6.object.create');
require('../modules/es6.object.define-property');
require('../modules/es6.object.define-properties');
require('../modules/es6.object.get-own-property-descriptor');
require('../modules/es6.object.get-prototype-of');
require('../modules/es6.object.keys');
require('../modules/es6.object.get-own-property-names');
require('../modules/es6.object.freeze');
require('../modules/es6.object.seal');
require('../modules/es6.object.prevent-extensions');
require('../modules/es6.object.is-frozen');
require('../modules/es6.object.is-sealed');
require('../modules/es6.object.is-extensible');
require('../modules/es6.function.bind');
require('../modules/es6.array.is-array');
require('../modules/es6.array.join');
require('../modules/es6.array.slice');
require('../modules/es6.array.sort');
require('../modules/es6.array.for-each');
require('../modules/es6.array.map');
require('../modules/es6.array.filter');
require('../modules/es6.array.some');
require('../modules/es6.array.every');
require('../modules/es6.array.reduce');
require('../modules/es6.array.reduce-right');
require('../modules/es6.array.index-of');
require('../modules/es6.array.last-index-of');
require('../modules/es6.number.to-fixed');
require('../modules/es6.number.to-precision');
require('../modules/es6.date.now');
require('../modules/es6.date.to-iso-string');
require('../modules/es6.date.to-json');
require('../modules/es6.parse-int');
require('../modules/es6.parse-float');
require('../modules/es6.string.trim');
require('../modules/es6.regexp.to-string');
module.exports = require('../modules/_core');
require('../../modules/es7.object.lookup-setter');
module.exports = require('../../modules/_core').Object.__lookupGetter__;
require('../modules/es6.object.to-string');
require('../modules/es6.array.iterator');
require('../modules/es6.weak-map');
module.exports = require('../modules/_core').WeakMap;
require('../../modules/es7.object.entries');
module.exports = require('../../modules/_core').Object.entries;
require('../../modules/es6.typed.array-buffer');
require('../../modules/es6.typed.data-view');
require('../../modules/es6.typed.int8-array');
require('../../modules/es6.typed.uint8-array');
require('../../modules/es6.typed.uint8-clamped-array');
require('../../modules/es6.typed.int16-array');
require('../../modules/es6.typed.uint16-array');
require('../../modules/es6.typed.int32-array');
require('../../modules/es6.typed.uint32-array');
require('../../modules/es6.typed.float32-array');
require('../../modules/es6.typed.float64-array');
require('../../modules/es6.object.to-string');
module.exports = require('../../modules/_core');
var $export = require('./_export');
$export($export.S + $export.F, 'Object', { isObject: require('./_is-object') });
require('./_typed-array')('Uint16', 2, function (init) {
return function Uint16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
var $parseInt = require('./_global').parseInt;
var $trim = require('./_string-trim').trim;
var ws = require('./_string-ws');
var hex = /^[-+]?0[xX]/;
module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
var string = $trim(String(str), 3);
return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
} : $parseInt;
'use strict';
// B.2.3.6 String.prototype.fixed()
require('./_string-html')('fixed', function (createHTML) {
return function fixed() {
return createHTML(this, 'tt', '', '');
};
});
'use strict';
module.exports.definition = {
set: function (v) {
this._setProperty('align-content', v);
},
get: function () {
return this.getPropertyValue('align-content');
},
enumerable: true,
configurable: true
};
'use strict';
module.exports.definition = {
set: function (v) {
this._setProperty('speak', v);
},
get: function () {
return this.getPropertyValue('speak');
},
enumerable: true,
configurable: true
};
'use strict';
module.exports.definition = {
set: function (v) {
this._setProperty('-webkit-margin-after', v);
},
get: function () {
return this.getPropertyValue('-webkit-margin-after');
},
enumerable: true,
configurable: true
};
{
"_from": "decode-uri-component@^0.2.0",
"_id": "decode-uri-component@0.2.0",
"_inBundle": false,
"_integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
"_location": "/decode-uri-component",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "decode-uri-component@^0.2.0",
"name": "decode-uri-component",
"escapedName": "decode-uri-component",
"rawSpec": "^0.2.0",
"saveSpec": null,
"fetchSpec": "^0.2.0"
},
"_requiredBy": [
"/source-map-resolve"
],
"_resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
"_shasum": "eb3913333458775cb84cd1a1fae062106bb87545",
"_spec": "decode-uri-component@^0.2.0",
"_where": "/Users/maritj/Documents/Documents/Dataing2ndyear/Systemutvikling2/Ovinger/Oving5/DatabaseTest/node_modules/source-map-resolve",
"author": {
"name": "Sam Verschueren",
"email": "sam.verschueren@gmail.com",
"url": "github.com/SamVerschueren"
},
"bugs": {
"url": "https://github.com/SamVerschueren/decode-uri-component/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "A better decodeURIComponent",
"devDependencies": {
"ava": "^0.17.0",
"coveralls": "^2.13.1",
"nyc": "^10.3.2",
"xo": "^0.16.0"
},
"engines": {
"node": ">=0.10"
},
"files": [
"index.js"
],
"homepage": "https://github.com/SamVerschueren/decode-uri-component#readme",
"keywords": [
"decode",
"uri",
"component",
"decodeuricomponent",
"components",
"decoder",
"url"
],
"license": "MIT",
"name": "decode-uri-component",
"repository": {
"type": "git",
"url": "git+https://github.com/SamVerschueren/decode-uri-component.git"
},
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "xo && nyc ava"
},
"version": "0.2.0"
}
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment