🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

filestack-loader

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filestack-loader

## Installation

3.0.4
latest
npm
Version published
Weekly downloads
3.5K
123.25%
Maintainers
1
Weekly downloads
 
Created
Source

Loader

Installation

npm install filestack-loader

Usage

Loading JavaScript Modules

If you have two modules a.js and b.js and you want to load b into a...

// file a.js
import loader from 'loader';

loader.loadModule('url/to/b.js').then((b) => {
  b.helloWorld();
});
// file b.js
import loader from 'loader';

const api = {
  helloWorld() {
    console.log('Hello world!');
  },
};

// Module need to "tell" the loader that it's loaded and ready.
loader.registerReadyModule(api);

Loading CSS

import loader from 'loader';

loader.loadCss('url/to/style.css').then(() => {
  console.log('Style loaded!');
});

Development

Setup

npm install

Testing

Unit

npm test

This command opens in the browser semi-manual tests. Those tests don't have watch, so you need to refire the command with each change.

FAQs

Package last updated on 03 Apr 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