mekanika / skematic

Data model & rule engine for JS objects
9 stars 0 forks source link

Setting preserve:true on generators fails to generate if no value given #38

Closed cayuu closed 6 years ago

cayuu commented 6 years ago
var model = {
    demo: {
        generate: { ops: () => 'moo!', preserve: true }
    }
}
format(model, {somekey: '!'})
// -> expect: { somekey: '!', demo: 'moo!' }
// -> actual: { somekey: '!' }
// :(