1.0.2 • Published 7 years ago
is-regalia v1.0.2
is-regalia
Validates regalia
Why?
To make it easy writing regalia tests.
How?
By traversing the provided tree and returning early on negatives.
Usage
Example
const regalia = require('regalia')
const isRegalia = require('is-regalia')
const constants = regalia({
a: ['one, two'],
b: ['one, two']
})
isRegalia(constants) // true
isRegalia({ a: Symbol('b') }) // false
isRegalia({ a: { one: Symbol('a.two') } }) // false
isRegalia({ a: Symbol.for('a') }) // false
isRegalia('foo') // false
isRegalia(Symbol()) // false
API
isRegalia(subject)
subject
: the value you wish to validate
Synchronously returns result boolean.