Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
36 lines
929 B
Plaintext
36 lines
929 B
Plaintext
"use strict";
|
|
/**
|
|
*
|
|
* utils
|
|
*
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.isAsyncIterable = exports.isExecutionResult = exports.isObject = exports.extendedTypeof = void 0;
|
|
/** @private */
|
|
function extendedTypeof(val) {
|
|
if (val === null) {
|
|
return 'null';
|
|
}
|
|
if (Array.isArray(val)) {
|
|
return 'array';
|
|
}
|
|
return typeof val;
|
|
}
|
|
exports.extendedTypeof = extendedTypeof;
|
|
/** @private */
|
|
function isObject(val) {
|
|
return typeof val === 'object' && val !== null;
|
|
}
|
|
exports.isObject = isObject;
|
|
/** @private */
|
|
function isExecutionResult(val) {
|
|
return (isObject(val) &&
|
|
('data' in val || ('data' in val && val.data == null && 'errors' in val)));
|
|
}
|
|
exports.isExecutionResult = isExecutionResult;
|
|
/** @private */
|
|
function isAsyncIterable(val) {
|
|
return typeof Object(val)[Symbol.asyncIterator] === 'function';
|
|
}
|
|
exports.isAsyncIterable = isAsyncIterable;
|