GitXplorerGitXplorer
j

waterpump

public
1 stars
0 forks
0 issues

Commits

List of commits on branch develop.
Unverified
8069526de822aed106269b59e43784f24a12f927

Bump 1.1.0

committed 5 years ago
Unverified
dea6658841ab6eb98ce5dcedf7b4d8b659a5fac5

Add mocks

committed 5 years ago
Verified
7bf7a113f56bc383ba4d087b505ae12247a1254b

Update unit-tests.yml

jjoeyrogues committed 5 years ago
Verified
5eb4424d57e970bb1529426d18f10a5cbb6f6e01

Update unit-tests.yml

jjoeyrogues committed 5 years ago
Verified
64650a18e0ef408733d8f916bc0d8557ca294a97

Update unit-tests.yml

jjoeyrogues committed 5 years ago
Verified
7912c799036c619ac29f670ad99f90d13835dd3f

Update unit-tests.yml

jjoeyrogues committed 5 years ago

README

The README file for this repository.

Unit Tests

Waterpump

Multi Purpose Dependency Injection

Install

npm install waterpump

Usage

Self explanatory

// a.js
module.exports = (ports) => ({
  one() {
    return ports.b.two()
  },

  three() {
    return 'something'
  }
})

// b.js
module.exports = (ports) => ({
  two() {
    return ports.a.three()
  }
})

// main.js
const { register } = require('waterpump')()

const a = register('a', require('./a'))
const b = register('b', require('./b'))

console.log(a.one())