File

src/util/object-utils.ts

Index

Methods

Methods

Public clone
clone(object: Object)
Parameters :
Name Type Optional Description
object Object
Returns : Object
Public isEquals
isEquals(object1: Object, object2: Object)
Parameters :
Name Type Optional Description
object1 Object
object2 Object
Returns : boolean
export class ObjectUtils {

  public static clone(object: Object): Object {
    return JSON.parse(JSON.stringify(object));
  }

  public static isEquals(object1: Object, object2: Object): boolean {
    return JSON.stringify(object1) === JSON.stringify(object2);
  }
}

results matching ""

    No results matching ""