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

import-dynamic

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-dynamic

Dynamic import module from url

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Import Dynamic

Dynamic import module from url.

Installation

npm install import-dynamic

Usage

import importDynamic from 'import-dynamic'

const fn = await importDynamic('https://url-of-module', {
  fetchOptions: { // fetch options
    method: 'GET',
  },
  globals: { // global values
    globalValue: 1,
  },
})
fn()
  • fetchOptions: An object containing any custom settings that you want to apply to the request. MDN Link
  • globals: An object containing global values.

Keywords

import

FAQs

Package last updated on 21 Mar 2023

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