UNPKG

wikibase-edit

Version:

Edit Wikibase from NodeJS

15 lines 493 B
import { newError } from '../error.js'; export function hasSpecialSnaktype(value) { if (typeof value !== 'object') return false; if (!('snaktype' in value)) return false; const { snaktype } = value; if (snaktype == null || snaktype === 'value') return false; if (snaktype === 'novalue' || snaktype === 'somevalue') return true; else throw newError('invalid snaktype', { snaktype }); } //# sourceMappingURL=special_snaktype.js.map