@globalfishingwatch/pbf
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

@globalfishingwatch/pbf

To use custom decoders for gfw api responses:

  1. Import the decoder function
import { vessels } from '@globalfishingwatch/pbf/decoders/vessels'
  1. Use it in the response
promise
  .then((r) => r.arrayBuffer())
  .then((buffer) => {
    const track = vessels.Track.decode(new Uint8Array(buffer))
    return track.data
  })

Readme

Keywords

none

Package Sidebar

Install

npm i @globalfishingwatch/pbf

Weekly Downloads

10

Version

1.0.11

License

MIT

Unpacked Size

155 kB

Total Files

7

Last publish

Collaborators

  • javiabia
  • rdgfuentes
  • j8seangel
  • global-fishing-watch