UNPKG

297 BJavaScriptView Raw
1'use strict';
2var $TypeError = TypeError;
3
4module.exports = function (options) {
5 var alphabet = options && options.alphabet;
6 if (alphabet === undefined || alphabet === 'base64' || alphabet === 'base64url') return alphabet || 'base64';
7 throw new $TypeError('Incorrect `alphabet` option');
8};