Form Builder utility methods
npm install @solidgoldpig/fb-utils-node
const FBUtils = require('@solidgoldpig/fb-utils-node')
FBUtils.logger(...args)
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)
Base class for errors
class MyError extends FBError {}
throw new MyError('An error occurred', {
data: additionalData
})
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