source: frontend/node_modules/source-map/lib/base64.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 582 bytes
RevLine 
[9af201e]1/* -*- Mode: js; js-indent-level: 2; -*- */
2/*
3 * Copyright 2011 Mozilla Foundation and contributors
4 * Licensed under the New BSD license. See LICENSE or:
5 * http://opensource.org/licenses/BSD-3-Clause
6 */
7
8const intToCharMap =
9 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
10
11/**
12 * Encode an integer in the range of 0 to 63 to a single base 64 digit.
13 */
14exports.encode = function (number) {
15 if (0 <= number && number < intToCharMap.length) {
16 return intToCharMap[number];
17 }
18 throw new TypeError("Must be between 0 and 63: " + number);
19};
Note: See TracBrowser for help on using the repository browser.