Core libraries for bunsen.
You may also want to check out:
- ember-bunsen-core – Ember shim for this package.
- ember-frost-bunsen – Ember implementation of bunsen with the Frost UI framework.
Core libraries for bunsen
License: MIT License
Core libraries for bunsen.
You may also want to check out:
Currently, if a value has a length
property, the parent object is treated as an array in recursiveClean()
.
We should still treat objects as objects when they have a length
property.
Coveralls.io doesn't report coverage against source files as the code coverage is generated against files in the lib directory which doesn't exist on Github. We need to figure how to report the coverage against the files in the src directory instead.
https://github.com/ciena-blueplanet/bunsen-core/blob/master/tests/deep-freeze.js#L7 is missing return
at the beginning of the statement and thus this method isn't ctually deep freezing objects, only arrays.
Currently the validation of the date format doesn't work the same in Firefox and Chrome. Specifically, it appears that 0.5 validates in Chrome as valid and in Firefox as invalid (it should be invalid in both).
Currently, zSchema will only report required errors for the top-level field missing. ember-frost-bunsen
relies on these messages to highlight fields that are missing. There was previous work done before to resolve this by making all required fields initialized with empty objects but that was a contradiction to the meaning of required as it allowed the form to pass validation without errors for required fields.
What needs to be done is to replace the required
errors with errors targeting the child fields. This can be tricky with arrays because arrays can't be further processed without having a value. Unlike an object whose fields are statically defined, the length of an array is dynamic.
What complicates this further is a form can reference an array item without having the array item exist initially but we need to provide appropriate error messages for them as well. So we would obviously need to tap into the view schema during this processing.
Currently this project has no documentation on what it's purpose is our how to consume it. We should thoroughly document it's API and provide links to things like ember-frost-bunsen and ember-bunsen-core.
I noticed that if a bunsenValue for a property
is null, then this conditional covers that case:
export function ifNotUndefined (path) {
return [
{
if: [
{
[path]: {
notEqual: undefined
}
}
]
}
]
as opposed to checking for null explicitly:
export function ifNotUndefinedAndNotNull (path) {
return [
{
if: [
{
[path]: {
notEqual: undefined
}, // AND
[path]: {
notEqual: null
}
}
]
}
]
}
Using unless, also did not suffice:
export function ifNotUndefinedAndNotNull (path) {
return [
{
unless: [
{
[path]: {equals: undefined}
}, // OR
{
[path]: {equals: null}
}
]
}
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.