At https://github.com/go-macaroon/js-macaroon/blob/master/macaroon.js#L1015
Maybe you mean locationStr: bytesToString(v2JSONField(caveat, 'l', false)),?
I'm discover this while I try to add TypeScript definition to this library (actually I think converting to TypeScript is easier).
Are you open to accept PR for the type definition or convert to TypeScript?