Socket
Socket
Sign inDemoInstall

seneca-parambulator

Package Overview
Dependencies
4
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    seneca-parambulator

Seneca plugin that provides parambulator message validation.


Version published
Weekly downloads
13
decreased by-65.79%
Maintainers
2
Install size
3.42 MB
Created
Weekly downloads
 

Changelog

Source

0.3.0 26-08-2016

  • Updated dependencies
  • Added Seneca 3 and Node 6 support
  • Dropped Node 0.10, 0.12, 5 support

Readme

Source

Seneca

A Seneca.js plugin that validates messages using the parambulator module.

seneca-parambulator

npm version Dependency Status Build Status Gitter

This plugin is included by default in Seneca 2.x.

NOTE: This plugin will not be included by default in Seneca 3.x and above, and will need to be installed manually.

Seneca compatibility

Supports Seneca versions 1.x - 3.x

Installation

This is needed only for Seneca 3.x and above.

npm install seneca-parambulator

And in your code:

require('seneca')()
  .use('parambulator')

Usage

You can validate action messages by providing parambulator rules as part of the action definition.

require('seneca')
    .use('parambulator') // not needed if Seneca 2.x
    .add(
      {
        a: 1,
        b: {required$: true}
      },
      function (msg, done) {
        done(null, {c: msg.b})
      })
    .act('a:1,b:2') // valid
    .act('a:1') // invalid as no b value

Any properties in the action pattern that are not constants are interpreted as_ parambulator_ rules.

Contributing

The Senecajs org encourages open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

License

Copyright (c) 2016, Richard Rodger and other contributors. Licensed under MIT.

Keywords

FAQs

Last updated on 26 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc