15 lines
376 B
JavaScript
15 lines
376 B
JavaScript
/* istanbul ignore file */
|
|
import { coerceValue } from './coerceValue';
|
|
/**
|
|
* Deprecated. Use coerceInputValue() directly for richer information.
|
|
*
|
|
* This function will be removed in v15
|
|
*/
|
|
|
|
export function isValidJSValue(value, type) {
|
|
var errors = coerceValue(value, type).errors;
|
|
return errors ? errors.map(function (error) {
|
|
return error.message;
|
|
}) : [];
|
|
}
|