https://github.com/shinnn/is-symlink-sync
Synchronously check if a file is a symbolic link
https://github.com/shinnn/is-symlink-sync
Last synced: 4 months ago
JSON representation
Synchronously check if a file is a symbolic link
- Host: GitHub
- URL: https://github.com/shinnn/is-symlink-sync
- Owner: shinnn
- License: mit
- Created: 2015-02-17T07:44:33.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-01T09:41:51.000Z (over 6 years ago)
- Last Synced: 2025-03-02T23:05:06.801Z (5 months ago)
- Language: JavaScript
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-symlink-sync
[](https://www.npmjs.com/package/is-symlink-sync)
[](https://travis-ci.com/shinnn/is-symlink-sync)
[](https://coveralls.io/r/shinnn/is-symlink-sync)A [Node.js](https://nodejs.org) module to check if a path is a [symbolic link](https://en.wikipedia.org/wiki/Symbolic_link) synchronously
```javascript
const isSymlinkSync = require('is-symlink-sync');isSymlinkSync('path/to/symlink'); //=> true
isSymlinkSync('path/to/non-symlink'); //=> false
```## Installation
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
```
npm install is-symlink-sync
```## API
```javascript
const isSymlinkSync = require('is-symlink-sync');
```### isSymlinkSync(*path*)
*path*: `string` `Buffer` `Uint8Array` `URL`
Return: `boolean`It returns `true` if the file exists and is a symbolic link, otherwise `false`.
## License
Copyright (c) 2015 - 2019 [Shinnosuke Watanabe](https://github.com/shinnn)
Licensed under [the MIT License](./LICENSE).