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