MCPcopy Index your code
hub / github.com/angular/angular / isShapeOf

Function isShapeOf

packages/core/test/render3/is_shape_of.ts:62–67  ·  view source on GitHub ↗
(obj: any, shapeOf: ShapeOf<T>)

Source from the content-addressed store, hash-verified

60 * @param shapeOf Desired shape.
61 */
62export function isShapeOf<T>(obj: any, shapeOf: ShapeOf<T>): obj is T {
63 if (typeof obj === 'object' && obj) {
64 return Object.keys(shapeOf).every((key) => obj.hasOwnProperty(key));
65 }
66 return false;
67}
68
69/**
70 * Determines if `obj` matches the shape `TI18n`.

Callers 6

isMyShapeFunction · 0.90
isTI18nFunction · 0.85
isTIcuFunction · 0.85
isTViewFunction · 0.85
isTNodeFunction · 0.85

Calls 1

keysMethod · 0.65

Tested by

no test coverage detected