TitleCase

Copied!
( value )

Description

The TitleCase function returns a string which has the first letter of each word capitalized.

Parameters

Parameter Type Definition and Requirements

value

The String having the words capitalized.

Returns

A String which has the first letter of each word capitalized.

Examples

Copied!
client.query(
  [
    q.('JOHN the FiReMan'),
    q.('FIRE And FireMan'),
  ]
)
.then((ret) => console.log(ret))
.catch((err) => console.error(
  'Error: [%s] %s: %s',
  err.name,
  err.message,
  err.errors()[0].description,
))
[ 'John The Fireman', 'Fire And Fireman' ]
Query metrics:
  •    bytesIn:  67

  •   bytesOut:  52

  • computeOps:   1

  •    readOps:   0

  •   writeOps:   0

  •  readBytes:   0

  • writeBytes:   0

  •  queryTime: 6ms

  •    retries:   0

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!