包详细信息

v8flags

gulpjs21.2mMIT4.0.1

Get available v8 and Node.js flags.

v8 flags, harmony flags

自述文件

v8flags

NPM version Downloads Build Status Coveralls Status

Get available v8 and Node.js flags.

Usage

const v8flags = require('v8flags');

v8flags(function (err, results) {
  console.log(results);
  // [ '--use_strict',
  //   '--es5_readonly',
  //   '--es52_globals',
  //   '--harmony_typeof',
  //   '--harmony_scoping',
  //   '--harmony_modules',
  //   '--harmony_proxies',
  //   '--harmony_collections',
  //   '--harmony',
  // ...
});

API

v8flags(cb)

Finds the available flags and calls the passed callback with any errors and an array of flag results.

v8flags.configfile

The name of the cache file for flags.

v8flags.configPath

The filepath location of the configfile above.

License

MIT

更新日志

Changelog

4.0.1 (2023-09-03)

Bug Fixes

  • Exclude example flags provided by node (#66) (58f009a)

4.0.0 (2021-11-08)

⚠ BREAKING CHANGES

  • Drop support for snake_case flags
  • Utilize process.allowedNodeEnvironmentFlags (#63)
  • Use SHA-256 for the config file name (#57)
  • Normalize repository, dropping node <10.13 support (#60)

Features

  • Remove homedir polyfill (#62) (306f970)
  • Utilize process.allowedNodeEnvironmentFlags (#63) (2240a0f)

Bug Fixes

  • Use SHA-256 for the config file name (#57) (f30a18e)

Miscellaneous Chores

  • Drop support for snake_case flags (e5194ca)
  • Normalize repository, dropping node <10.13 support (#60) (42ad05f)