multiformats / js-cid

CID implementation in JavaScript
MIT License
98 stars 39 forks source link

fix: turn isCID to a type guard #134

Closed Gozala closed 3 years ago

Gozala commented 3 years ago

This fixes regression caused by switch to generated typedefs which turned isCID to non type guard predicate. For details on type guards see: https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards