shopify-gid
Universal encoder/decoder for ID values returned from the Shopify Storefront GraphQL API. 400 bytes gzipped.
Install
npm i shopify-gid --save
Usage
decode(base64hash)
// => { type: 'Product', id: '12345', params: { accessToken: 'abcde123' }, raw: 'Z2lkOi8...' }
encode(type, id[, params])
// => Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzEyMzQ1...
License
MIT License © Eric Bailey