Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
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.

README.md 2.0KB

4 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # node-environment-flags
  2. > Polyfill/shim for `process.allowedNodeEnvironmentFlags`
  3. [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
  4. **node-environment-flags** is a *rough* polyfill and shim for [process.allowedNodeEnvironmentFlags](https://nodejs.org/api/process.html#process_process_allowednodeenvironmentflags), which was introduced in Node.js v10.10.0.
  5. ## Table of Contents
  6. - [Install](#install)
  7. - [Usage](#usage)
  8. - [Maintainers](#maintainers)
  9. - [Contribute](#contribute)
  10. - [License](#license)
  11. ## Install
  12. *Requires Node.js v6.0.0 or newer.*
  13. ```shell
  14. $ npm i node-environment-flags
  15. ```
  16. ## Usage
  17. If the current Node.js version is v10.10.0 or newer, the native implementation will be provided instead.
  18. ### As Polyfill (Recommended)
  19. ```js
  20. const nodeEnvironmentFlags = require('node-environment-flags');
  21. nodeEnvironmentFlags.has('--require'); // true
  22. ```
  23. ### As Shim
  24. ```js
  25. require('node-environment-flags/shim')();
  26. process.allowedNodeEnvironmentFlags.has('--require'); // true
  27. ```
  28. ## Notes
  29. - This module approximates what `process.allowedNodeEnvironmentFlags` provides in versions of Node.js prior to v10.10.0. Since `process.allowedNodeEnvironmentFlags` is based on [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) (introduced in v8.0.0), the set of supported flags for versions older than v8.0.0 is *highly theoretical*.
  30. - Version ranges are matched using [semver](https://npm.im/semver).
  31. - This module is granular to the *minor* Node.js version number; *patch* version numbers are not considered.
  32. - Results for unmaintained (odd) versions of Node.js are based on data for the most recent LTS version; e.g., running this module against Node.js v7.10.0 will yield the same results as would v6.14.0.
  33. - Prior art: @ljharb's [util.promisify](https://npm.im/util.promisify)
  34. ## Maintainers
  35. [@boneskull](https://github.com/boneskull)
  36. ## License
  37. Copyright © 2018 Christopher Hiller. Licensed Apache-2.0.