main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
484 bytes
|
Line | |
---|
1 | import baseCreate from './_baseCreate.js';
|
---|
2 | import getPrototype from './_getPrototype.js';
|
---|
3 | import isPrototype from './_isPrototype.js';
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * Initializes an object clone.
|
---|
7 | *
|
---|
8 | * @private
|
---|
9 | * @param {Object} object The object to clone.
|
---|
10 | * @returns {Object} Returns the initialized clone.
|
---|
11 | */
|
---|
12 | function initCloneObject(object) {
|
---|
13 | return (typeof object.constructor == 'function' && !isPrototype(object))
|
---|
14 | ? baseCreate(getPrototype(object))
|
---|
15 | : {};
|
---|
16 | }
|
---|
17 |
|
---|
18 | export default initCloneObject;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.