UNPKG
adlayer-library
Version:
latest (1.0.3)
1.0.3
1.0.2
Adlayer javascript core library
adlayer-library
/
src
/
utils
/
copy.js
17 lines
(16 loc)
•
240 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/** *
@module
utils
*
@class
Utils
*
@static
*/
/** * Prototype pattern Object.create() in old browsers *
@method
copy
*
@param
{
Object
}
obj
*/
function
copy
(
obj
){
function
F
(
){} F.
prototype
= obj;
return
new
F
(); }
exports
.
copy
= copy;