JSPM

  • Created
  • Published
  • Downloads 712
  • Score
    100M100P100Q106190F
  • License BSD-3-Clause

Library to validate data compliance with the Canonical Reducer Composition design pattern.

Package Exports

  • canonical

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 (canonical) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Canonical

Travis build status NPM version

Canonical Reducer Composition pattern component validator.

import {
    validateReducer,
    validateAction,
    validateActionName
} from 'canonical';

/**
 * @throws Error if input reducerDefinition is not compliant with the spec.
 */
validateReducer(reducerDefinition);

/**
 * @throws Error if action is not compliant with the spec.
 */
validateAction(action);

/**
 * @throws Error if action name is not compliant with the spec.
 */
validateActionName(actionName);

Using gulp

gulpfile.js is written using ES6. Therefore, it needs to be executed using babel-node.

babel-node ./node_modules/.bin/gulp build