UNPKG

timpla

Version:

An optimal website development experience for [server-side] web frameworks.

9 lines (7 loc) 244 B
export const clone = (obj: { [k: string]: any }) => JSON.parse(JSON.stringify(obj)) describe('clone', () => { it('should clone an object', () => { const result = clone({ hello: 1 }) expect(result).toMatchObject({ hello: 1 }) }) })