UNPKG

@jsmanifest/content-combiner

Version:

Combine content from multiple sources and transform them into one unified data structure to work with

17 lines (16 loc) 582 B
import * as T from './types'; declare class Keymapper<DataObject extends {} = any> { keymap: T.Keymap<DataObject>; /** * Uses the key to retrieve the mapped value, which is used on the obj * @param { string } key */ parse<D extends DataObject>(mapper: T.Mapper<DataObject>, obj?: D): any; get(key: string): string | T.ArrayMapper | T.FuncMapper<DataObject> | undefined; /** * Sets the mapper into the keymap by the key * @param { string } key */ set(key: string, mapper: T.Mapper<DataObject>): this; } export default Keymapper;