UNPKG

@botonic/plugin-contentful

Version:

Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet

24 lines (23 loc) 867 B
export declare function shallowClone<T extends object>(obj: T): T; /** * Deep copy function for TypeScript. * @param T Generic type of target/copied value. * @param target Target value to be copied. * @see Source project, ts-deepcopy https://github.com/ykdr2017/ts-deepcopy * @see Code pen https://codepen.io/erikvullings/pen/ejyBYg */ export declare const deepClone: <T>(target: T, alreadyCloned?: object[]) => T; export interface Equatable { equals(other: Equatable): boolean; } export interface Stringable { toString(): string; } export interface ValueObject extends Equatable, Stringable { } /** * It returns a ROUGH estimation, since V8 will greatly optimize anyway * @return the number of bytes * Not using https://www.npmjs.com/package/object-sizeof to minimize dependencies */ export declare function roughSizeOfObject(object: any): number;