/** * Get a property of a plain object * Throws an error in case the object is not a plain object or the * property is not defined on the object itself * @param {Object} object * @param {string} prop * @return {*} Returns the property value when safe */ declare function getSafeProperty(object: unknown, prop: string): unknown; /** * Set a property on a plain object. * Throws an error in case the object is not a plain object or the * property would override an inherited property like .constructor or .toString * @param {Object} object * @param {string} prop * @param {*} value * @return {*} Returns the value */ declare function setSafeProperty(object: unknown, prop: string, value: unknown): unknown; /** * Test whether a property is safe to use on an object or Array. * For example .toString and .constructor are not safe * @param {Object | Array} object * @param {string} prop * @return {boolean} Returns true when safe */ declare function isSafeProperty(object: unknown, prop: string): boolean; /** * Validate whether a method is safe. * Throws an error when that's not the case. * @param {Object} object * @param {string} method * @return {function} Returns the method when valid */ declare function getSafeMethod(object: unknown, method: string): unknown; /** * Check whether a method is safe. * Throws an error when that's not the case (for example for `constructor`). * @param {Object} object * @param {string} method * @return {boolean} Returns true when safe, false otherwise */ declare function isSafeMethod(object: unknown, method: string): boolean; declare function isPlainObject(object: unknown): boolean; export { getSafeProperty }; export { setSafeProperty }; export { isSafeProperty }; export { getSafeMethod }; export { isSafeMethod }; export { isPlainObject }; //# sourceMappingURL=customs.d.ts.map