Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

@episerver/amd-loader-proxy

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@episerver/amd-loader-proxy

A proxy to the AMD require function used in Episerver

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
4
300%
Maintainers
2
Weekly downloads
 
Created
Source

amd-loader-proxy

A proxy to the AMD require function used in Episerver.

Installation

yarn

yarn add @episerver/amd-loader-proxy

npm

npm install @episerver/amd-loader-proxy

Importing

import loader from "@episerver/amd-loader-proxy";

Usage

The @episerver/amd-loader-proxy package exports a single function that takes the module ids as string parameters and returns a promise. This promise will resolve to an array containing the results for each module, e.g.:

// Load a single AMD module.
loader("dojo/topic").then(([topic]) => {

});

// Load multiple AMD modules.
loader("dojo/topic", "epi-cms/plugin-area/navigation-tree").then(([topic, navigationTreePluginArea]) => {

});

Or if you are using async/await:

const foo = async () => {
    // Load a single AMD module.
    const [topic] = await loader("dojo/topic");

    // Load multiple AMD modules.
    const [topic, navigationTreePluginArea] = await loader("dojo/topic", "epi-cms/plugin-area/navigation-tree");
}

License

MIT © Episerver

FAQs

Package last updated on 05 Nov 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