JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 302
  • Score
    100M100P100Q92796F
  • License MIT

Synchronously check if a file is a symbolic link

Package Exports

  • is-symlink-sync

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-symlink-sync) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-symlink-sync

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.