JSPM

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

Returns true if a link can be created

Package Exports

  • can-link

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 (can-link) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

can-link

Returns true if a link can be created

npm version

Installation

<npm|yarn|pnpm> add can-link

Usage

const canLink = require('can-link')

canLink.sync('C:\\foo.txt', 'D:\\foo.txt')
//> false

canLink.sync('C:\\foo.txt', 'C:\\dir\\foo.txt')
//> true

API

canLink.sync(existingPath, newPath): Boolean

Returns true if fs.linkSync(existingPath, newPath) is able to create a link.

canLink(existingPath, newPath): Promise<Boolean>

Returns true if fs.link(existingPath, newPath) is able to create a link.

License

MIT © Zoltan Kochan