mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 05:15:49 +08:00
[react-packager][streamline oss] Move open sourced JS source to react-native-github
This commit is contained in:
21
Libraries/Utilities/mergeIntoFast.js
Normal file
21
Libraries/Utilities/mergeIntoFast.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
*
|
||||
* @providesModule mergeIntoFast
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Faster version of `mergeInto` that doesn't check its arguments and
|
||||
* also copies over prototye inherited properties.
|
||||
*
|
||||
* @param {object} one Object to assign to.
|
||||
* @param {object} two Object to assign from.
|
||||
*/
|
||||
var mergeIntoFast = function(one, two) {
|
||||
for (var keyTwo in two) {
|
||||
one[keyTwo] = two[keyTwo];
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = mergeIntoFast;
|
||||
Reference in New Issue
Block a user