UNPKG

@ecomplus/utils

Version:

JS utility functions to E-Com Plus (not only) related apps

20 lines 630 B
export default objectIdPad; /** * @method * @memberof ecomUtils * @name objectIdPad * @description Merge received ObjectID string with new index. * @param {string} id - Base ID string, 24 digits hexadecimal * @param {string} index - The index to be inserted on the end of base ID, creating new ObjectID * @returns {string & { length: 24 }} * * @example * const id = '5ce59fbf887ef430f1f6ed29' * const index = '5' * ecomUtils.objectIdPad(id, index) * // => '5ce59fbf887ef430f1f6ed25' */ declare function objectIdPad(id: string, index: string): string & { length: 24; }; //# sourceMappingURL=object-id-pad.d.ts.map