Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
fwsp-umf-message
Advanced tools
Readme
Used to create and validate UMF style messages.
You can install it via NPM:
$ npm -i fwsp-umf-message
const Utils = require('fwsp-umf-message');
let instanceID = 'fa1ae8d5-86fc-44af-aad8-cd2740aef041';
let msg = UMFMessage.createMessage({
to: `${instanceID}@test-service:[GET]/v1/somedata`,
from: 'client:/',
body: {}
});
Tests can be found in the specs
folder.
$ npm test
/**
* @name createMessageID
* @summary Returns a UUID for use with messages
* @return {string} uuid - UUID
*/
createMessageID()
/**
* @name createShortMessageID
* @summary Returns a short form UUID for use with messages
* @return {string} uuid - UUID
*/
createShortMessageID()
/**
* @name createMessage
* @summary Create a UMF style message.
* @description This is a helper function which helps format a UMF style message.
* The caller is responsible for ensuring that required fields such as
* "to", "from" and "body" are provided either before or after using
* this function.
* @param {object} message - optional message overrides.
* @param {boolean} shortFormat - optional flag to use UMF short form syntax.
* @return {object} message - a UMF formatted message.
*/
createMessage(message, shortFormat=false)
/**
* @name validateMessage
* @summary Validates that a UMF message has required fields
* @param {object} message - UMF formatted message
* @return {boolean} response - returns true is valid otherwise false
*/
validateMessage(message)
/**
* @name getMessageBody
* @summary Return the body from a UMF message
* @param {object} message - UMF message
* @return {object} body - UMF message body
*/
getMessageBody(message)
/**
* @name parseRoute
* @summary parses message route strings
* @private
* @param {string} toValue - string to be parsed
* @return {object} object - containing route parameters. If the
* object contains an error field then the route
* isn't valid.
*/
parseRoute(toValue)
FAQs
umf-message: a tool for creating and working with UMF style messages
The npm package fwsp-umf-message receives a total of 413 weekly downloads. As such, fwsp-umf-message popularity was classified as not popular.
We found that fwsp-umf-message demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.