Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ministryofjustice/fb-utils-node

Package Overview
Dependencies
Maintainers
12
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ministryofjustice/fb-utils-node

Form Builder utilities

  • 0.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
12
Created
Source

fb-utils-node

Form Builder utility methods

Installing

npm install @ministryofjustice/fb-utils-node

Usage

const FBUtils = require('@ministryofjustice/fb-utils-node')

Methods

logger

FBUtils.logger(...args)

clone

Returns a shallow copy of any object

const clonedObj = FBUtils.clone(obj)

Objects can be of any type.

By default, the object copy is shallow.

To create a deep copy, pass true:

const deeplyClonedObj = FBUtils.clone(obj, true)

FBError

Base class for errors

class MyError extends FBError {}

throw new MyError('An error occurred', {
  data: additionalData
})

Testing

npm test
# Test output is in [TAP](https://testanything.org/) format

Run unit tests only

npm run test:unit

Run linting only

npm run lint

FAQs

Package last updated on 21 Nov 2019

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