Neophobe Plebeian Mumpsimus

    This package has been deprecated

    Author message:

    This package will not receive ongoing development

    @ministryofjustice/fb-utils-node

    0.1.8 • Public • Published

    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

    Keywords

    none

    Install

    npm i @ministryofjustice/fb-utils-node

    DownloadsWeekly Downloads

    11

    Version

    0.1.8

    License

    MIT

    Unpacked Size

    18.4 kB

    Total Files

    20

    Last publish

    Collaborators

    • paulmassey
    • johnnolan
    • simonwhatley
    • form-builder-developers
    • form-builder-team
    • sequencemedialimited
    • asmega
    • adamsilver
    • stevemarshall
    • elena_vi
    • emileswarts
    • romidane
    • todderz
    • umaar
    • solidgoldpig