Previous commits in this bug removed Emacs/Vim modelines from files under paths listed in tools/rewriting/ThirdPartyPaths.txt, which we should not touch. Restore the modelines on the files that still need it; the remaining ones were already restored by upstream resyncs. Reverts the relevant hunks from:e1fe74e9e3- gfx/ (12 of 140 files still affected)6be5ec2fff- toolkit/ (45 files)074b376055- devtools/ (10 files)d2b4f9d727- js/ (3 files)0804530f25- ipc/ (2 files)63d9534ed5- other-licenses/ (1 file)50cd0384b0- media/ (1 file)55481ac4b5- layout/ (1 file)05e870a9a8- testing/ (1 file) Differential Revision: https://phabricator.services.mozilla.com/D295578
20 lines
582 B
JavaScript
20 lines
582 B
JavaScript
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
/*
|
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
* Licensed under the New BSD license. See LICENSE or:
|
|
* http://opensource.org/licenses/BSD-3-Clause
|
|
*/
|
|
|
|
const intToCharMap =
|
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
|
|
/**
|
|
* Encode an integer in the range of 0 to 63 to a single base 64 digit.
|
|
*/
|
|
exports.encode = function (number) {
|
|
if (0 <= number && number < intToCharMap.length) {
|
|
return intToCharMap[number];
|
|
}
|
|
throw new TypeError("Must be between 0 and 63: " + number);
|
|
};
|