MCPcopy Create free account
hub / github.com/decaporg/decap-cms / optionToString

Function optionToString

packages/decap-cms-widget-select/src/SelectControl.js:10–14  ·  view source on GitHub ↗
(option)

Source from the content-addressed store, hash-verified

8import { validations } from 'decap-cms-lib-widgets';
9
10function optionToString(option) {
11 return option && (typeof option.value === 'number' || typeof option.value === 'string')
12 ? option.value
13 : null;
14}
15
16function convertToOption(raw) {
17 if (typeof raw === 'string') {

Callers 2

RelationControlClass · 0.85
SelectControlClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected