Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

symlinks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

symlinks

Glob symlinks, async or sync. API and CLI. CLI also has `--del` for deleting matching symlinks.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Glob symlinks, async or sync. API and CLI. CLI also has --del for deleting matching symlinks.

Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.

Install

Install with npm:

$ npm install --save symlinks

CLI Usage

Get a list of symlinks that match a glob pattern[1].

Examples

# symlinks <pattern> [options]
$ symlinks "node_modules/*"
$ symlinks "node_modules/*" -d
$ symlinks "node_modules/*" -c
$ symlinks "node_modules/*" -g
$ symlinks "node_modules/*" -gd
$ symlinks "node_modules/*" -gc

CLI Options

FlagDescription
-d, --deleteDelete matching symlinks
-g, --globalMatch symlinks in NPM's global directory
-c, --cleanDelete symlinks that do not resolve to a realpath

Delete

Delete matching[1] symlinks with --del:

$ symlinks "node_modules/*" --del

API Usage

Params

  • patterns {String|Array}: One or more glob patterns for matching symlinks.
  • {Object}: Options to pass to matched.
  • {Function}

Example

// symlinks(pattern[, options, callback])
symlinks('node_modules/*')
  .then(links => console.log('SYMLINKS:', links))
  .catch(console.error);

.sync

Synchronous version, returns an array of symlinks that match the given glob pattern.

Params

  • patterns {String|Array}
  • options {Object}: Options to pass to matched
  • returns {Array}: Returns an array of symbolic links

Example

// symlinks.sync(pattern[, options])
console.log(symlinks.sync('node_modules/*'));

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test
Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Author

Jon Schlinkert

License

Copyright © 2018, Jon Schlinkert. Released under the MIT License.

This file was generated by verb-generate-readme, v0.6.0, on August 09, 2018.

  • Globs probably need to be wrapped in quotes or escaped with backticks depending on shell.

Keywords

async

FAQs

Package last updated on 09 Aug 2018

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