Valid JSONX JSON
Props to test comparison values against, usually Object.assign(jsonx.props,jsonx.asyncprops,jsonx.thisprops,jsonx.windowprops)
returns true if all comparisons are true or if using or comparisons, at least one condition is true
Fetches JSON from remote path
fetch path url
fetch options
Use to test if can bind components this context for react-redux-router
true if browser is not IE or old android / chrome
Transforms SimpleJSONX to Valid JSONX JSON {[component]:{props,children}} => {component,props,children}
JSON Object
take an object of array paths to traverse and resolve
an object to resolve array property paths
object to traverse
resolved object with traversed properties
validates simple JSONX Syntax {[component]:{props,children}}
Any valid simple JSONX Syntax
returns true if simpleJSONX is valid
Validates JSONX JSON Syntax
JSONX JSON to validate
either returns true if JSONX is valid, or throws validation error or returns list of errors in array
Used to evaluate whether or not to render a component
const sampleJSONX = { component: 'div', props: { id: 'generatedJSONX', className: 'jsonx', bigNum: 1430931039, smallNum: 0.425, falsey: false, truthy: true, }, children: 'some div', }; const testJSONX = Object.assign({}, sampleJSONX, { comparisonprops: [{ left: ['truthy',], operation:'==', right:['falsey',], }], }); displayComponent({ jsonx: testJSONX, props: testJSONX2.props, }) // => false