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 *--------------------------------------------------------------------------------------------*/
5 export function equals(one, other) {
9 if (one === null || one === undefined || other === null || other === undefined) {
12 if (typeof one !== typeof other) {
15 if (typeof one !== 'object') {
18 if ((Array.isArray(one)) !== (Array.isArray(other))) {
22 if (Array.isArray(one)) {
23 if (one.length !== other.length) {
26 for (i = 0; i < one.length; i++) {
27 if (!equals(one[i], other[i])) {
43 if (!equals(oneKeys, otherKeys)) {
46 for (i = 0; i < oneKeys.length; i++) {
47 if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {
54 export function isNumber(val) {
55 return typeof val === 'number';
57 export function isDefined(val) {
58 return typeof val !== 'undefined';
60 export function isBoolean(val) {
61 return typeof val === 'boolean';
63 export function isString(val) {
64 return typeof val === 'string';