Package Exports
- solvent
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (solvent) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
solvent
Simple dependency resolver designed for validating typed dependency contraints.
Install
npm i -S solvent
Usage
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
#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');