1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.isValidJSValue = isValidJSValue;
|
7 |
|
8 | var _coerceValue = require("./coerceValue");
|
9 |
|
10 | /**
|
11 | * Copyright (c) 2015-present, Facebook, Inc.
|
12 | *
|
13 | * This source code is licensed under the MIT license found in the
|
14 | * LICENSE file in the root directory of this source tree.
|
15 | *
|
16 | *
|
17 | */
|
18 |
|
19 | /**
|
20 | * Deprecated. Use coerceValue() directly for richer information.
|
21 | *
|
22 | * This function will be removed in v15
|
23 | */
|
24 | function isValidJSValue(value, type) {
|
25 | var errors = (0, _coerceValue.coerceValue)(value, type).errors;
|
26 | return errors ? errors.map(function (error) {
|
27 | return error.message;
|
28 | }) : [];
|
29 | } |
\ | No newline at end of file |