Files
30-seconds-of-code/node_modules/graphql-compose/esm/utils/is.js.flow
2019-08-20 15:52:05 +02:00

14 lines
444 B
Plaintext

/* @flow strict */
export function isString(value: ?mixed) /* : boolean %checks */ {
return typeof value === 'string';
}
export function isObject(value: ?mixed) /* : boolean %checks */ {
return typeof value === 'object' && !Array.isArray(value) && value !== null;
}
export function isFunction(value: ?mixed) /* : boolean %checks */ {
return !!(value && value.constructor && value.call && typeof value === 'function' && value.apply);
}