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.

42 lines
2.2 KiB

2 years ago
  1. # node-supports-preserve-symlinks-flag <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
  2. [![github actions][actions-image]][actions-url]
  3. [![coverage][codecov-image]][codecov-url]
  4. [![dependency status][deps-svg]][deps-url]
  5. [![dev dependency status][dev-deps-svg]][dev-deps-url]
  6. [![License][license-image]][license-url]
  7. [![Downloads][downloads-image]][downloads-url]
  8. [![npm badge][npm-badge-png]][package-url]
  9. Determine if the current node version supports the `--preserve-symlinks` flag.
  10. ## Example
  11. ```js
  12. var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag');
  13. var assert = require('assert');
  14. assert.equal(supportsPreserveSymlinks, null); // in a browser
  15. assert.equal(supportsPreserveSymlinks, false); // in node < v6.2
  16. assert.equal(supportsPreserveSymlinks, true); // in node v6.2+
  17. ```
  18. ## Tests
  19. Simply clone the repo, `npm install`, and run `npm test`
  20. [package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag
  21. [npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg
  22. [deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg
  23. [deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag
  24. [dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg
  25. [dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies
  26. [npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true
  27. [license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg
  28. [license-url]: LICENSE
  29. [downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg
  30. [downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag
  31. [codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg
  32. [codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/
  33. [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag
  34. [actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions