New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-symlink-sync

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-symlink-sync

Synchronously check if a file is a symbolic link

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
381
decreased by-20.95%
Maintainers
1
Weekly downloads
 
Created
Source

npm version Build Status Build status Coverage Status

Synchronously check if a file is a symbolic link

const isSymlinkSync = require('is-symlink-sync');

isSymlinkSync('path/to/symlink'); //=> true
isSymlinkSync('path/to/non-symlink'); //=> false

Installation

Use npm.

npm install is-symlink-sync

API

const isSymlinkSync = require('is-symlink-sync');

isSymlinkSync(filePath)

filePath: string, Buffer or URL
Return: boolean

It returns true if the file exists and is a symbolic link, otherwise false.

Only when the argument type is invalid, it throws an error.

isSymlinkSync(Buffer.from('123')); // doesn't throw any errors
isSymlinkSync(123); // throws a TypeError

License

Copyright (c) 2015 - 2017 Shinnosuke Watanabe

Licensed under the MIT License.

Keywords

FAQs

Package last updated on 05 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc