Socket
Socket
Sign inDemoInstall

source-src

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    source-src

A small library for getting the path to a file or directory.


Version published
Maintainers
1
Install size
222 kB
Created

Readme

Source

source-src

A small library for getting the path to a file or directory.

Import

import * as src from "source-src";

src.file

This function asks for a file path and returns a promise.

import * as src from "source-src";

src.file(message, src, ignore).then(resolve).catch(reject);
  • message: string - Displayed message
  • src?: string - The path from which the request starts by default is process.cwd()
  • ingore?: RegExp[] - This is an array of regular expressions through which it is indicated which name should be ignored.

src.directory

This function asks for a directory path and returns a promise.

import * as src from "source-src";

src.directory(message, src, ignore).then(resolve).catch(reject);
  • message: string - Displayed message
  • src?: string - The path from which the request starts by default is process.cwd()
  • ingore?: RegExp[] - This is an array of regular expressions through which it is indicated which name should be ignored.

To select a directory, you need to click on the green "Confirm" button and press enter.

FAQs

Last updated on 22 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc