Writing code
FUNCTION
@skmtc/lang-typescript 0.19.1toParameterVariable
Names the variable that holds an operation parameter in generated code.
A name that is not an identifier is camel-cased, and a reserved word gains the suffix sanitizeIdentifier gives it. Two names can give one variable (a-b and aB).
Signature
import { toParameterVariable } from '@skmtc/lang-typescript'
toParameterVariable(name: string): stringParameters
name, string required
Example
toParameterVariable('user_id') // 'user_id'
toParameterVariable('enterprise-team') // 'enterpriseTeam'
toParameterVariable('export') // 'exportValue'
toParameterVariable('2fa') // '_2fa'Returns
string