@hybridly/utils
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -51,2 +51,23 @@ import makeDebugger from 'debug'; | ||
declare function removeTrailingSlash(string: string): string; | ||
/** | ||
* Sets a value at a path in an object | ||
* | ||
* This function will set a value at a path in an object, creating any missing | ||
* objects along the way. The object is modified in place. | ||
* | ||
* @param obj the object to set the value in | ||
* @param path a dot-separated path to the property to set | ||
* @param value the value to set | ||
*/ | ||
declare function setValueAtPath(obj: any, path: string, value: any): void; | ||
/** | ||
* Unsets a property at a path in an object | ||
* | ||
* This function will unset a property at a path in an object, deleting any | ||
* objects along the way that are empty. The object is modified in place. | ||
* | ||
* @param obj the object to unset the property in | ||
* @param path a dot-separated path to the property to unset | ||
*/ | ||
declare function unsetPropertyAtPath(obj: any, path: string): void; | ||
@@ -65,2 +86,2 @@ declare const debug: { | ||
export { FormDataConvertible, RequestData, debounce, debug, hasFiles, match, merge, objectToFormData, random, removeTrailingSlash, showDomainsDisabledErrorModal, showPageComponentErrorModal, showResponseErrorModal, value, when }; | ||
export { FormDataConvertible, RequestData, debounce, debug, hasFiles, match, merge, objectToFormData, random, removeTrailingSlash, setValueAtPath, showDomainsDisabledErrorModal, showPageComponentErrorModal, showResponseErrorModal, unsetPropertyAtPath, value, when }; |
{ | ||
"name": "@hybridly/utils", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Utils used in Hybridly packages", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
30233
845