@vandeurenglenn/proto-array
v1.0.17
Published
> Makes things smaller
Downloads
16
Readme
native-proton
Makes things smaller
install
npm i @vandeurenglenn/proto-array
usage
const proto = {
index: 0,
hash: '0xf1a1'
}
const data = {
index: 5,
hash: '0xa1f1'
}
const encoded = encode(proto, data)
const decoded = decode(proto, encoded)
explanation
when encoding keys(propertyNames) are excluded from the encoded data using the provided proto when decoding these keys are set using the provided proto