Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 568 Bytes

toLabelAndValue.md

File metadata and controls

20 lines (13 loc) · 568 Bytes

toLabelAndValue (source code)

  • Curried: false
  • Failsafe status: failsafe by default

The toLabelAndValue function takes a string as an argument and returns an object with keys "label" and "value." It is often used to transform a string into an object with specific key-value pairs.

Arguments:

  • string: A string that needs to be converted to an object.

Usage:

toLabelAndValue("test");

// output: {label: "test", value: "test"}