mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-20 05:10:56 +00:00
Provider config and cli-based setup
This commit is contained in:
9
lib/util.js
Normal file
9
lib/util.js
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
// Converts "accessToken" to "Access Token"
|
||||
export function camelCaseToRegularForm(camelCase: string): string {
|
||||
return camelCase
|
||||
// insert a space before all caps
|
||||
.replace(/([A-Z])/g, ' $1')
|
||||
// uppercase the first character
|
||||
.replace(/^./, function(str){ return str.toUpperCase(); })
|
||||
}
|
||||
Reference in New Issue
Block a user