This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------------------------ | |
Pick in object | |
--------------------------------------------- */ | |
const peek = (...keep) => iter => keep.indexOf(iter) > -1; | |
const split = c => c.split('.'); | |
const tail = array => { | |
const [head, ...result] = array; // eslint-disable-line | |
return result; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------------------------ | |
DataCollection | |
--------------------------------------------- */ | |
class DataCollection { | |
constructor(v) { | |
this.value = v || [] | |
} | |
override(v) { | |
this.value = v.slice(0) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"primitives": { | |
"$description": "A group of primitive values", | |
"hexadecimalRed": { | |
"$type": "hexadecimalColorString", | |
"$value": "#9B1C0C" | |
}, | |
"aZeroToOneNumber": { | |
"$type": "zeroToOneNumber", | |
"$value": 0.3 |