solvent

Simple dependency resolver designed for validating typed dependency contraints.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
solvent
0.16.37 years ago8 years agoMinified + gzip package size for solvent in KB

Readme

solvent
Simple dependency resolver designed for validating typed dependency contraints. Build Status codecov NPM

Install

npm i -S solvent

Usage

```js import solvent from 'solvent' export default function (dependencies) { const { React, connect } = solvent( { React: 'object'
, connect: 'function'
} )(dependencies)
/ DO SOMETHING / } ``` ---

TEST

Unit tests output for current release:
TOC
- [lib](#lib)
  - [#default](#lib-default)
  - [solvent](#lib-solvent)
lib

default

should have default export.
return should.exist(lib.default);

solvent

should be a function.
return solvent.should.be.a('function');

should not throw.
return function () {
  return solvent();
}.should.not.throw();

should return a function.
return solvent().should.be.a('function');

should validate object.
var resolver = solvent({ React: 'object' });
resolver({ React: { prop: 'Some property' } }).should.be.an('object').that.has.property('React').that.is.an('object');