How to use the platform function from process

Find comprehensive JavaScript process.platform code examples handpicked from public code repositorys.

31
32
33
34
35
36
37
38
39
const CssRelativeURLRegExp =
  /(url\("?)((?!\/|data:|http:\/\/|https:\/\/|file:\/\/)[^")]+)("?\))/gm;
const MdImagesRegExp = /(!\[.*?]\()(file:\/{3}.+?)((?=\)))/gm;
const HtmlImagesRegExp = /(<img[^>]+src=["'])(file:\/{3}.[^">]+?)(["'])/gm;
const CssImagesRegExp = /(url\("?)((file:\/\/)[^")]+)("?\))/gm;
const isWindows = process.platform.startsWith('win');

const help = `${pkg.name} ${pkg.version}
Usage: bs [init|serve|export|pdf] [options]
fork icon56
star icon740
watch icon10

387
388
389
390
391
392
393
394
395
396
397
    });
  });
};


console.log(`Initializing voice engine with audio subsystem: ${audioSubsystem}`);
VoiceEngine.platform = process.platform;
VoiceEngine.initialize({
  audioSubsystem,
  logLevel,
  dataDirectory,
fork icon0
star icon0
watch icon1