@typespec/ts-http-runtime
Version:
Isomorphic client library for making HTTP requests in node.js and browser.
14 lines • 475 B
JavaScript
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Helper to determine when an input is a generic JS object.
* @returns true when input is an object type that is not null, Array, RegExp, or Date.
*/
export function isObject(input) {
return (typeof input === "object" &&
input !== null &&
!Array.isArray(input) &&
!(input instanceof RegExp) &&
!(input instanceof Date));
}
//# sourceMappingURL=object.js.map