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>
58 lines
1.3 KiB
JavaScript
58 lines
1.3 KiB
JavaScript
'use strict';
|
|
|
|
exports.repeat = function (str, num) {
|
|
var result = '';
|
|
for (var i = 0; i < num; i++) { result += str; }
|
|
return result;
|
|
};
|
|
|
|
exports.arrayEqual = function (a, b) {
|
|
if (a.length !== b.length) { return false; }
|
|
for (var i = 0; i < a.length; i++) {
|
|
if (a[i] !== b[i]) { return false; }
|
|
}
|
|
return true;
|
|
};
|
|
|
|
exports.trimChars = function (str, chars) {
|
|
var start = 0;
|
|
var end = str.length - 1;
|
|
while (chars.indexOf(str.charAt(start)) >= 0) { start++; }
|
|
while (chars.indexOf(str.charAt(end)) >= 0) { end--; }
|
|
return str.slice(start, end + 1);
|
|
};
|
|
|
|
exports.capitalize = function (str) {
|
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
};
|
|
|
|
exports.arrayUnion = function () {
|
|
var result = [];
|
|
for (var i = 0, values = {}; i < arguments.length; i++) {
|
|
var arr = arguments[i];
|
|
for (var j = 0; j < arr.length; j++) {
|
|
if (!values[arr[j]]) {
|
|
values[arr[j]] = true;
|
|
result.push(arr[j]);
|
|
}
|
|
}
|
|
}
|
|
return result;
|
|
};
|
|
|
|
function has(obj, key) {
|
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
}
|
|
|
|
exports.has = has;
|
|
|
|
exports.extend = function (dest, src) {
|
|
for (var i in src) {
|
|
if (has(src, i)) { dest[i] = src[i]; }
|
|
}
|
|
};
|
|
|
|
exports.trimEnd = function (str) {
|
|
return str.replace(/\s+$/g, '');
|
|
};
|