@tradle/iot-message
v3.0.0
Published
encode/decode Tradle Iot message
Downloads
2
Readme
@tradle/iot-message
Usage
const { encode, decode } = require('@tradle/iot-message')
encode({
payload: { some: 'json' },
encoding: 'gzip' // default
})
.then(buf => decode(buf))
// send buf
// ..
// receive buf
.then(buf => console.log(JSON.parse(buf)))
// { some: 'json' }