Leverege Platform

Leverege Platform

  • Overview
  • JSDocs
  • REST API
  • Help

›Utilities

Platform Overview

  • Overview
  • Architecture
  • Core Concepts

Guides

  • Platform Setup
  • Building a Project
  • API UI

Services

  • API Server
  • Message Processor
  • Transponder
  • Reason
  • Scheduler
  • Messenger
  • Emailer
  • Rest Server
  • DB Curator

API

  • API
  • Interface
  • Project
  • System
  • Device
  • Blueprint
  • Collection
  • Child
  • History
  • Scenario
  • Script
  • Template
  • Timer
  • User
  • Users

Server Libraries

  • Log
  • Messages
  • Message Queue
  • Cache
  • Lock
  • Limit
  • Cluster Manager
  • Error
  • Exit

Utilities

  • Promise
  • Data Store
  • Factory
  • Path
  • Reasoner
  • Object Util
  • Array Util
  • String Util
  • Base62 Util
  • Value Cache
  • Validator
  • Lol

UI

  • API Redux
  • UI Builder
  • UI Elements
  • UI Redux
  • UI Mapbox Elements
  • UI Active Theme
  • UI Color Elements
  • UI Linear View Elements

String Util

This library has methods for manipulating and accessing strings.

Install

npm install --save @leverege/string-util

const StringUtil = require( '@leverege/string-util' );

camelCaseToTitleCase( string, capitalizeAll = false )

returns a space separated title case version of the string

capitalize( str )

returns the str with the first letter capitalized

capitalizeAll( str )

returns the str with every letter capitalized

escapeRegExp( str )

escapes the string

replaceAll( str, find, replace )

Replaces all instances of the find value in str with the replace value

isEmpty( str )

returns true if the string is empty or only contains spaces

nullOrTrim( str, returnNullIfNotString = true )

trims the string if it is a string

← Array UtilBase62 Util →
  • Install
  • camelCaseToTitleCase( string, capitalizeAll = false )
  • capitalize( str )
  • capitalizeAll( str )
  • escapeRegExp( str )
  • replaceAll( str, find, replace )
  • isEmpty( str )
  • nullOrTrim( str, returnNullIfNotString = true )
Leverege Platform
Docs
Overview
Connect
FacebookLinkedInTwitter
Facebook Open Source