@artossystems/configured

1.0.1 • Public • Published

Configured

This is a tiny dependency injection framework.

Installation

npm install @artossystems/configured

Usage Example

Configuration

In the file src/configured.js

const configured = require('@artossystems/configured')

module.exports = configured({
    item1: function constructItem1 () {
      // item 1 is constructed here
      return ret
    },

    item2: function () {
      // item 2 is constructed here
      // can refer to item1 as `this.item1` at which point it will be
      // constructed
      return ret
    }  
  })

Using

const configured = require('./configured')
configured.item1.method('param1')

Readme

Keywords

none

Package Sidebar

Install

npm i @artossystems/configured

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

1.43 kB

Total Files

4

Last publish

Collaborators

  • adrijardi
  • jim_wilde
  • andybry
  • fluorostani
  • nahuseyoum
  • alexp_artos