mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-03 17:49:19 +02:00
making base-x compatible with node & browser
This commit is contained in:
parent
b12a099e29
commit
54d21a7803
4 changed files with 9 additions and 5 deletions
|
@ -6,7 +6,9 @@
|
|||
// Distributed under the MIT software license, see the accompanying
|
||||
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
var baseX = function base (ALPHABET) {
|
||||
(function(){
|
||||
'use strict';
|
||||
this.baseX = function base (ALPHABET) {
|
||||
if (ALPHABET.length >= 255) throw new TypeError('Alphabet too long')
|
||||
|
||||
const BASE_MAP = new Uint8Array(256)
|
||||
|
@ -146,3 +148,4 @@ var baseX = function base (ALPHABET) {
|
|||
decode: decode
|
||||
}
|
||||
}
|
||||
}).call(this);
|
Loading…
Add table
Add a link
Reference in a new issue