Socket
Socket
Sign inDemoInstall

fwsp-umf-message

Package Overview
Dependencies
2
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

fwsp-umf-message

umf-message: a tool for creating and working with UMF style messages


Version published
Maintainers
2
Weekly downloads
158
increased by7.48%

Weekly downloads

Readme

Source

UMF Message Build Status

Used to create and validate UMF style messages.

Install

You can install it via NPM:

$ npm -i fwsp-umf-message

Usage

const UMFMessage = require('fwsp-umf-message');
let msg = UMFMessage.createMessage({
  to: `test-service:[GET]/v1/somedata`,
  from: 'client:/',
  body: {
    somevalues: [1,2,3,4]
  }
});

You can also access message fields for getting and setting:

console.log('msg.to', msg.to);
msg.to = 'router:/';
console.log('msg.to', msg.to);

To retrieve an entire message object use:

console.log(msg.toJSON());

Tests

Tests can be found in the specs folder.

$ npm test

FAQs

Last updated on 09 Nov 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