UNPKG

fontoxpath

Version:

A minimalistic XPath 3.1 engine in JavaScript

12 lines (10 loc) 290 B
import tryCastToType from './casting/tryCastToType'; /** * @param {!./AtomicValue<*>} value * @param {string} type * @return {boolean} */ export default function canCastToType (value, type) { const result = tryCastToType(value, type); return result.successful; }