New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

five-bells-shared

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

five-bells-shared

Shared components for Five Bells projects.

  • 14.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
87
increased by8.75%
Maintainers
1
Weekly downloads
 
Created
Source

Five Bells Shared Circle CI

Shared module among Five Bells Node.js apps

Installation

npm install --save five-bells-shared

Schema Validator

This module contains a schema validator.

Log Service

The log service uses mag and a custom formatter to generate pretty logs like this:

Example log output

Usage

const log = require('five-bells-shared/services/log')('transfers');

log.debug('very boring information');
log.info('somewhat useful information');
log.warn('sort of important information');
log.error('super-important information');

Log Test Helper

The log helper is useful in tests to mute the log output of tests and print it if the test fails.

Usage

const logHelper = require('five-bells-shared/testHelpers/log');

describe('Transfers', function () {
  logHelper();

  // ...
});

JSON signing

JSONSigning module provides API for adding signature block, and verifying it, in a JSON object. The format follows JSON Cleartext Signature (JCS) specification.

Usage

JSONSigning.sign (json, cryptoType, privateKey, publicKey)

  json : JSON object.  Must not have "signature" block at the top level.
  cryptoType : "PS256" for RSA PSS, or "ES256" for ECDSA
  privateKey : Private key.
               For RSA, it can be a PEM format string, or jsrsasign RSA key object.
               For ECDSA, it has to be jsrsasign ECDSA key object.
  publicKey  : Public key.
               This is not needed for
               For ECDSA, it has to be jsrsasign ECDSA key object.

  Returns copy of JSON object with "signature" block added.  It does not modify the original JSON object.

JSONSigning.verify (json, cryptoType, publicKey)

  json : JSON object.  Must have "signature" block at the top level.
  cryptoType : "PS256" for RSA PSS, or "ES256" for ECDSA
  publicKey  : Public key.
               For RSA, it can be a PEM format string, or jsrsasign RSA key object.
               For ECDSA, it has to be jsrsasign ECDSA key object.

  Returns true (signature is valid) or false (otherwise)

Keywords

FAQs

Package last updated on 28 Apr 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc