fix(core): update
This commit is contained in:
14
ts/tools/exists.ts
Normal file
14
ts/tools/exists.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as plugins from '../smartobject.plugins';
|
||||
|
||||
/**
|
||||
* checks if an object has a parameter with a given key name, returns true if yes.
|
||||
* @param parentObject
|
||||
* @param childParam
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export let exists = (parentObject: object, childParam: string): boolean => {
|
||||
if (parentObject.hasOwnProperty(childParam)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user