New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

require-uri

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-uri

Import a module from everywhere

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

require-uri

This module make you can import/require a module from wherever with node.js.
currently supports loading module from ...

  • Local storage
  • HTTP
  • HTTPS
  • FTP

Installation

npm install require-uri

Usage

var requireUri = require("request-uri");
requireUri(/* source path or uri */).then(module => { /* do something */ });

API

requireUri(target [, options])

target [required]

Type: string | string[]

Specific target module url, path, etc.

options [optional]

Type: object

Specific options of loading module, options can be specified like below.

NameTypeDefaultDescription
typestring"local"connection type. can specify these type of connection. "local", "http", "https", "ftp"
cachingbooleantruecache option for specified module. if false, require-uri will not make cache of specified module.
userstringanonymoususer string that will be used at authorization.
passwordstringanonymous@password that will be used at authorization.
hoststring-the host where specified module is hosted.
portinteger-Port number of host. The default value depends on type of connection.

Licence

This project is licensed under the terms of the MIT license

FAQs

Package last updated on 15 Mar 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