Validate firepad text operation json
Installation
npm i --save validate-firepad-text-operation
Usage
Example 1: Successfully validate text-operation json
var validate = var opJSON = 10 'hello world' 20 // Success // Go on and create a firepad TextOperationTextOperation
Example 2: Successfully invalidate text-operation json
var validate = // throws [Error: must be an array]// throws [Error: operation cannot be empty]// throws [Error: invalid operation start]// throws [Error: invalid operation middle]// throws [Error: invalid operation end]
License
MIT