Socket
Socket
Sign inDemoInstall

seneca-basic

Package Overview
Dependencies
3
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    seneca-basic

Seneca utility plugin.


Version published
Weekly downloads
229
increased by32.37%
Maintainers
3
Install size
2.03 MB
Created
Weekly downloads
 

Readme

Source

Seneca

A Seneca.js utility plugin

seneca-basic

npm version Dependency Status Build Status Coveralls Gitter chat

This plugin is included with the main seneca module and provides a small set of basic utility action patterns.

If you're using this module, and need help, you can:

seneca-basic's source can be read in an annotated fashion by,

  • running npm run annotate
  • viewing online

The annotated source can be found locally at ./doc/seneca-basic.html.

Seneca compatibility

Supports Seneca versions 1.x - 3.x

Install

This plugin module is included in the main Seneca module.

npm install seneca

Explicit install

To explicitly install separately,

npm install seneca-basic

And in your code:

var seneca = require('seneca')({
  default_plugins: {
    'basic': false
  }
})

seneca.use(require('seneca-basic'))

Action Patterns

role:basic, note:true, cmd:set

Set a note value. Notes are a simple internal per-process communication mechanism for plugins to exchange data. In particular, plugins can set keyed values before the plugin that uses the data reads it. See seneca-admin for an example.

Parameters

  • key: string; key name
  • value: key value

Response:

  • None.

role:basic, note:true, cmd:get

Get a note value.

Parameters

  • key: string; key name

Response:

  • value: key value, if defined

role:basic, note:true, cmd:push

Push a note value onto a list. The namespace for lists is separate from the namespace for single values. The list is created if it does not exist.

Parameters

  • key: string; key name
  • value: value to append to list.

Response:

  • None.

role:basic, note:true, cmd:list

Get the full list of values for the key, in pushed order.

Parameters

  • key: string; key name

Response:

  • Array of values.

role:basic, note:true, cmd:pop

Get the last value of a list, and remove it from the list.

Parameters

  • key: string; key name

Response:

  • value: key value, if list was non-empty

Releases

  • 0.3.0: 2015-06-15: Normalized note patterns. Prep for Seneca 0.6.2.

Contributing

The Senecajs org encourage 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.

Test

To run tests, simply use npm:

npm run test

License

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

Keywords

FAQs

Last updated on 29 Jan 2020

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