screeb

Sometimes our payloads are hard to read for a human, because business is spread accross.

Usage no npm install needed!

<script type="module">
  import screeb from 'https://cdn.skypack.dev/screeb';
</script>

README

Screeb

Motive

Sometimes our payloads are hard to read for a human, because business is spread accross.

This is a lib that takes a SimpliField data structure and output it in a more comprehensive textual representation.

Usage

JSON to text (decode a payload)

# Example for a report
curl 'https://app.simplifield.com/api/v3/organisations/<oid>/reports/<rid>?mode=expanded'
  # -H 'headername: headervalue'...
  # -H 'cookie: cookies as string containing jwt'
  --compressed --silent 
| node lib/report

You can obtain the curl command easily in Chrome's Devtools' Network

Imgur

JS to text (decode an object)

import { store } from 'screeb'
/* ... */
console.log(store(storeExample))

Compatible resources

  • lib/report
  • lib/store