UNPKG

pig-dam-core

Version:

Library that should be included in every Pig DAM project we build

29 lines 800 B
/** * Date: 2019-07-13 * Time: 13:42 * @license MIT (see project's LICENSE file) * */ /** * Creates a urn either by <param>path</param> or by <param>parts</param>: * - path: "urn:<path>:<nss>" * - parts: "urn:<path[0]>:<path[2]>...<path[n-1]>:<nss>" */ export declare function createUrn({ path, nss }: { nss?: string; path?: string | string[]; }): string; /** * Parses a urn and returns bits * @param urn - the whole urn * @param parts - optionally may specify the names of the parts in which case the * result will be an object of values mapped to these part names. * @throws {Error} */ export declare function parseUrn(urn: string, parts?: string[]): { parts: string[] | { [index: string]: string; }; nss: string; }; //# sourceMappingURL=urn.d.ts.map