@solidgoldpig/fb-utils-node

0.1.7 • Public • Published

fb-utils-node

Form Builder utility methods

Installing

npm install @solidgoldpig/fb-utils-node

Usage

const FBUtils = require('@solidgoldpig/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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @solidgoldpig/fb-utils-node

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

18 kB

Total Files

19

Last publish

Collaborators

  • solidgoldpig