Sha256: b8e0b5e367a81621235f3f4eb4552e62bc49cfe487173024c1b4165904b5aec5
Contents?: true
Size: 435 Bytes
Versions: 20
Compression:
Stored size: 435 Bytes
Contents
import { last } from './commonHelper'; const idSeparator = '-'; const versionSeparator = ':'; const defaultVersion = '01'; export const decodeModelId = model => decodeId(model.id); export const decodeId = globalId => { const split = atob(globalId).split(idSeparator); return parseInt(last(split), 10); }; export const encodeId = (typename, id) => btoa([defaultVersion, versionSeparator, typename, idSeparator, id].join(''));
Version data entries
20 entries across 20 versions & 1 rubygems