Socket
Socket
Sign inDemoInstall

antjs

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    antjs

Ant.js Promise module loader


Version published
Weekly downloads
4
Maintainers
1
Install size
832 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 30 Aug 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc