1 /*---------------------------------------------------------------------------------------------
2 * Copyright (c) Microsoft Corporation. All rights reserved.
3 * Licensed under the MIT License. See License.txt in the project root for license information.
4 *--------------------------------------------------------------------------------------------*/
6 if (typeof module === "object" && typeof module.exports === "object") {
7 var v = factory(require, exports);
8 if (v !== undefined) module.exports = v;
10 else if (typeof define === "function" && define.amd) {
11 define(["require", "exports"], factory);
13 })(function (require, exports) {
15 Object.defineProperty(exports, "__esModule", { value: true });
16 exports.isString = exports.isBoolean = exports.isDefined = exports.isNumber = exports.equals = void 0;
17 function equals(one, other) {
21 if (one === null || one === undefined || other === null || other === undefined) {
24 if (typeof one !== typeof other) {
27 if (typeof one !== 'object') {
30 if ((Array.isArray(one)) !== (Array.isArray(other))) {
34 if (Array.isArray(one)) {
35 if (one.length !== other.length) {
38 for (i = 0; i < one.length; i++) {
39 if (!equals(one[i], other[i])) {
55 if (!equals(oneKeys, otherKeys)) {
58 for (i = 0; i < oneKeys.length; i++) {
59 if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {
66 exports.equals = equals;
67 function isNumber(val) {
68 return typeof val === 'number';
70 exports.isNumber = isNumber;
71 function isDefined(val) {
72 return typeof val !== 'undefined';
74 exports.isDefined = isDefined;
75 function isBoolean(val) {
76 return typeof val === 'boolean';
78 exports.isBoolean = isBoolean;
79 function isString(val) {
80 return typeof val === 'string';
82 exports.isString = isString;