Skip to content

nrkn/domon-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

domon-validator

A validator for the DOMON format

The DOMON format is just a lightweight DOM representation with no circular references, making it suitable for JSON etc.

Install

npm install domon-validator

Usage

The validator is just an instance of tv4 prepopulated with the DOMON schema

const validator = require( 'domon-validator' )

const domon = [ 'div', { id: 'myDiv' }, [ 'Hello World' ] ]

console.log( validator.validate( domon, 'domon-element' ) )

About

A validator for the DOMON format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published