[api] Add clone function to utils
This commit is contained in:
parent
04e3c57397
commit
1158525abb
|
@ -5,3 +5,4 @@ export * from './src/stores/';
|
||||||
export * from './src/utils/datetime';
|
export * from './src/utils/datetime';
|
||||||
export * from './src/utils/permission';
|
export * from './src/utils/permission';
|
||||||
export * from './src/utils/validators';
|
export * from './src/utils/validators';
|
||||||
|
export * from './src/utils/misc';
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
export function clone<T>(o: T): T {
|
||||||
|
return <T>JSON.parse(JSON.stringify(o));
|
||||||
|
}
|
Loading…
Reference in New Issue