MCPcopy Index your code
hub / github.com/tensorflow/tfjs-examples / isNode

Function isNode

electron/image_classifier.js:247–253  ·  view source on GitHub ↗

* Is the current environment Node.js? * * This logic is specific to Electron, because it checks * `process.type`.

()

Source from the content-addressed store, hash-verified

245 * `process.type`.
246 */
247function isNode() {
248 return (
249 typeof process === 'object' &&
250 typeof process.versions === 'object' &&
251 typeof process.versions.node !== 'undefined' &&
252 process.type !== 'renderer');
253}
254
255/** Get the user's home directory (Node.js only). */
256function getUserHomeDirectory() {

Callers 1

ensureModelLoadedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected