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

antjs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antjs

Ant.js Promise module loader

0.1.1
latest
Source
npm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Ant.js

A Promise module loader.

Usage

Ant.js loads modules and calls a defined constructor function based on a simple configuration.

Example:

ant.load({
  module1: {
    module: 'module_file1',
    entry: 'function_name',
    arguments: ['argument1', 'argument2'],
    dependency: ['module2']
  },
  module2: 'module_file2'
}, context);

Configuration

  • key: module name
  • value: filename or extended configuration
    • module: filename
    • entry: alternative constructor function (sub property of module.exports)
    • arguments: an array of arguments for the constructor function
    • dependency: string or array that contains the module name(s) of the dependencies

Context

Optional the second parameter of ant.load can be used to set the context for the constructor function call.

Global Settings

Module Path

ant.path can be used to defined a lookup path for modules.

Debug Messages

Debug message can be enabled by assigning ant.debug the value true.

Keywords

loader

FAQs

Package last updated on 30 Aug 2015

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