UNPKG

@liamcottle/push-receiver

Version:

A library to subscribe to GCM/FCM and receive notifications within a node process.

16 lines (13 loc) 236 B
module.exports = { escape, toBase64, }; function escape(string) { return string .replace(/=/g, '') .replace(/\+/g, '-') .replace(/\//g, '_'); } function toBase64(input) { return escape(input.toString('base64')); }