File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 14
14
import * as React from 'react' ;
15
15
import StyleSheetPropType from 'react-native/Libraries/StyleSheet/StyleSheetPropType' ;
16
16
import ReactNativeViewAttributes from 'react-native/Libraries/Components/View/ReactNativeViewAttributes' ;
17
- import mergeFast from 'react-native/Libraries/Utilities /mergeFast' ;
17
+ import mergeFast from '. /mergeFast' ;
18
18
import PropTypes from 'prop-types' ;
19
19
import createReactClass from 'create-react-class' ;
20
20
import TextStylePropTypes from 'react-native/Libraries/Text/TextStylePropTypes' ;
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @providesModule mergeFast
8
+ * @flow
9
+ */
10
+ 'use strict' ;
11
+
12
+ /**
13
+ * Faster version of `merge` that doesn't check its arguments and
14
+ * also merges prototype inherited properties.
15
+ *
16
+ * @param {object } one Any non-null object.
17
+ * @param {object } two Any non-null object.
18
+ * @return {object } Merging of two objects, including prototype
19
+ * inherited properties.
20
+ */
21
+ var mergeFast = function ( one : Object , two : Object ) : Object {
22
+ var ret = { } ;
23
+ for ( var keyOne in one ) {
24
+ ret [ keyOne ] = one [ keyOne ] ;
25
+ }
26
+ for ( var keyTwo in two ) {
27
+ ret [ keyTwo ] = two [ keyTwo ] ;
28
+ }
29
+ return ret ;
30
+ } ;
31
+
32
+ module . exports = mergeFast ;
You can’t perform that action at this time.
0 commit comments