mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
* Bump lodash from 4.17.15 to 4.17.19 (#52) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * Bump @actions/core from 1.1.3 to 1.2.6 (#60) Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.1.3 to 1.2.6. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * updating node_nodules * updated package-lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
45 lines
1.3 KiB
JavaScript
45 lines
1.3 KiB
JavaScript
(function (w) {
|
|
"use strict";
|
|
|
|
function findBest(atobNative) {
|
|
// normal window
|
|
if ('function' === typeof atobNative) { return atobNative; }
|
|
|
|
|
|
// browserify (web worker)
|
|
if ('function' === typeof Buffer) {
|
|
return function atobBrowserify(a) {
|
|
//!! Deliberately using an API that's deprecated in node.js because
|
|
//!! this file is for browsers and we expect them to cope with it.
|
|
//!! Discussion: github.com/node-browser-compat/atob/pull/9
|
|
return new Buffer(a, 'base64').toString('binary');
|
|
};
|
|
}
|
|
|
|
// ios web worker with base64js
|
|
if ('object' === typeof w.base64js) {
|
|
// bufferToBinaryString
|
|
// https://git.coolaj86.com/coolaj86/unibabel.js/blob/master/index.js#L50
|
|
return function atobWebWorker_iOS(a) {
|
|
var buf = w.base64js.b64ToByteArray(a);
|
|
return Array.prototype.map.call(buf, function (ch) {
|
|
return String.fromCharCode(ch);
|
|
}).join('');
|
|
};
|
|
}
|
|
|
|
return function () {
|
|
// ios web worker without base64js
|
|
throw new Error("You're probably in an old browser or an iOS webworker." +
|
|
" It might help to include beatgammit's base64-js.");
|
|
};
|
|
}
|
|
|
|
var atobBest = findBest(w.atob);
|
|
w.atob = atobBest;
|
|
|
|
if ((typeof module === 'object') && module && module.exports) {
|
|
module.exports = atobBest;
|
|
}
|
|
}(window));
|