p5-analysis
Version:
API to find, create, and analyze p5.js sketch files.
19 lines (18 loc) • 742 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDefined = void 0;
/** Check whether a value is defined (non-nullable), meaning it is neither
* `null` or `undefined`.
*
* This function is copied from https://github.com/sindresorhus/ts-extras.
*
* It is here so that I don't have to debug why esbuild-jest produces an error
* (`SyntaxError: Unexpected token 'export'`) when it tries to compile a file
* that imports the ts-extras package. (Possibly something that could be fixed
* via `transformIgnorePatterns`, but the standard "node_modules/(?!(@etc."
* value did not fix this.)
*/
function isDefined(value) {
return value !== null && value !== undefined;
}
exports.isDefined = isDefined;
;