UNPKG

capnp-js

Version:

Capnproto run-time decoding and encoding for Node

16 lines (15 loc) 483 B
var fields = require('../fields'); module.exports = function(List) { var has = fields.pointer.has(); List._FIELD.has = function(offset) { return function() { return has(this, offset); }; }; List._FIELD.unionHas = function(discr, offset) { return function() { fields.throwOnInactive(this.which(), discr); return has(this, offset); }; }; };