Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/utils / dist / module / remapProps.d.ts
Size: Mime:
/**
 * @desc remap properties from 1 to another, for example, apis with inconsistent naming
 * @symb 🗺
 *
 * @param from property name string, or {[from]: to}
 * @param [to=undefined] property name to change key to
 *
 * @example
 *  const disToDat = remap({dis: 'dat'})
 *  disToDat({dis: 1, other: true})
 *  //=> {dist: 1, other: true}
 *
 */
export interface RemapAnyObjDefault {
    [key: string]: any;
}
declare function remap<Props extends {} = RemapAnyObjDefault>(from: object | string, to: string): (props: Props) => Props;
export { remap };
export { remap as remapProps };
export default remap;