google-big-query-labels
A library to encode strings so that they can be written as label metadata on google big query entries. These labels are have a number of rules which restrict their usage, and this package ensure that the encoded string conforms to those rules. This library is useful for encoding Id's.
API
Re-encoding strings specifying their original alphabets.
const encode decode = ;const stringToEncode = 'helloworld1';const base36Alphabet = '0123456789abcdefghijklmnopqrstuvwxyz';const encoded = ; // 'l834pvjszr_n' // 'helloworld1'
Utility function to re-encode strings which are encoded in the base 64 url alphabet.
const encodeBase64Url decodeBase64Url = ;const base64UrlEncoded = 'c29tZWJhc2U2NGVuY29kZWQ';const encoded = ; // 'l-a9qk8gqih_dsohfdkul2gafsz0' // 'c29tZWJhc2U2NGVuY29kZWQ'