This package has been deprecated

Author message:

Not maintained.

is-regalia

1.0.2 • Public • Published

Build Status JavaScript Style Guide

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.

Package Sidebar

Install

npm i is-regalia

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • mightyiam