UNPKG

376 BJavaScriptView Raw
1/* istanbul ignore file */
2import { coerceValue } from './coerceValue';
3/**
4 * Deprecated. Use coerceInputValue() directly for richer information.
5 *
6 * This function will be removed in v15
7 */
8
9export function isValidJSValue(value, type) {
10 var errors = coerceValue(value, type).errors;
11 return errors ? errors.map(function (error) {
12 return error.message;
13 }) : [];
14}