demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/lodash-4.17.20/assign.js

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/lodash-4.17.20/assign.js
Status
scanned
Type
file
Name
assign.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
1566 (1.5 KB)
MD5
9008a4050aef77ece0049342a39fab69
SHA1
c80789cd7fd35c7190290526e466eed28caafa80
SHA256
e97ed43f77aac5c8faa3689ab3620360ba3c51e422f419bf04093385caedef2d
SHA512

      
    
SHA1_git
909db26a344edf53a70405f433d8da31881f232f
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
assign.js | 1.5 KB |

var assignValue = require('./_assignValue'), copyObject = require('./_copyObject'), createAssigner = require('./_createAssigner'), isArrayLike = require('./isArrayLike'), isPrototype = require('./_isPrototype'), keys = require('./keys'); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns own enumerable string keyed properties of source objects to the * destination object. Source objects are applied from left to right. * Subsequent sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object` and is loosely based on * [`Object.assign`](https://mdn.io/Object/assign). * * @static * @memberOf _ * @since 0.10.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.assignIn * @example * * function Foo() { * this.a = 1; * } * * function Bar() { * this.c = 3; * } * * Foo.prototype.b = 2; * Bar.prototype.d = 4; * * _.assign({ 'a': 0 }, new Foo, new Bar); * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } for (var key in source) { if (hasOwnProperty.call(source, key)) { assignValue(object, key, source[key]); } } }); module.exports = assign;
URL Start line End line
https://mdn.io/Object/assign 20 20
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript
pkg:npm/lodash@4.17.20 mit JavaScript