Added set to available types

Added `set` which does exist (https://github.com/rhalff/dot-object/blob/master/index.js#L358) but is undocumented. Used for replacing an object -> https://github.com/rhalff/dot-object/issues/8.
This commit is contained in:
Josh
2019-01-18 09:12:05 +00:00
committed by GitHub
parent d901e5a8c6
commit f39b626373
+13
View File
@@ -120,12 +120,25 @@ declare namespace DotObject {
*/
remove(path: string, obj: any): any;
/**
*
* Replace/create with a string
*
* @param {String} path dotted path
* @param {String} v value to be set
* @param {Object} obj object to be modified
* @param {Function|Array} mods optional modifier
*/
str(path: string, v: any, obj: Object, mods?: ModifierFunctionWrapper | Array<ModifierFunctionWrapper>): void;
/**
*
* Replace/merge an object to an existing object property
*
* @param {String} path dotted path
* @param {Object} v object to be set
* @param {Object} obj object to be modified
* @param {Boolean} merge optional merge
*/
set(path: string, v: any, obj: Object, merge?: Boolean): void;
/**
*
* Transfer a property from one object to another object.