版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 1 година
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <p align="center">
  2. <a href="http://gulpjs.com">
  3. <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
  4. </a>
  5. </p>
  6. # v8flags
  7. [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]
  8. Get available v8 and Node.js flags.
  9. ## Usage
  10. ```js
  11. const v8flags = require('v8flags');
  12. v8flags(function (err, results) {
  13. console.log(results);
  14. // [ '--use_strict',
  15. // '--es5_readonly',
  16. // '--es52_globals',
  17. // '--harmony_typeof',
  18. // '--harmony_scoping',
  19. // '--harmony_modules',
  20. // '--harmony_proxies',
  21. // '--harmony_collections',
  22. // '--harmony',
  23. // ...
  24. });
  25. ```
  26. ## API
  27. ### `v8flags(cb)`
  28. Finds the available flags and calls the passed callback with any errors and an array of flag results.
  29. ### `v8flags.configfile`
  30. The name of the cache file for flags.
  31. ### `v8flags.configPath`
  32. The filepath location of the `configfile` above.
  33. ## License
  34. MIT
  35. <!-- prettier-ignore-start -->
  36. [downloads-image]: https://img.shields.io/npm/dm/v8flags.svg?style=flat-square
  37. [npm-url]: https://www.npmjs.com/package/v8flags
  38. [npm-image]: https://img.shields.io/npm/v/v8flags.svg?style=flat-square
  39. [ci-url]: https://github.com/gulpjs/v8flags/actions?query=workflow:dev
  40. [ci-image]: https://img.shields.io/github/workflow/status/gulpjs/v8flags/dev?style=flat-square
  41. [coveralls-url]: https://coveralls.io/r/gulpjs/v8flags
  42. [coveralls-image]: https://img.shields.io/coveralls/gulpjs/v8flags/master.svg?style=flat-square
  43. <!-- prettier-ignore-end -->