本文整理匯總了TypeScript中ember-cli-string-utils.camelize函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript camelize函數的具體用法?TypeScript camelize怎麽用?TypeScript camelize使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了camelize函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
normalizeEntityName: function (entityName: string) {
const appConfig = getAppFromConfig(this.options.app);
const parsedPath = dynamicPathParser(this.project, entityName, appConfig);
this.dynamicPath = parsedPath;
const defaultPrefix = (appConfig && appConfig.prefix) || '';
let prefix = (this.options.prefix === 'false' || this.options.prefix === '')
? '' : (this.options.prefix || defaultPrefix);
prefix = prefix && `${prefix}-`;
this.selector = stringUtils.camelize(prefix + parsedPath.name);
return parsedPath.name;
},
示例2: function
normalizeEntityName: function (entityName: string) {
const parsedPath = dynamicPathParser(this.project, entityName);
this.dynamicPath = parsedPath;
let defaultPrefix = '';
if (this.project.ngConfig &&
this.project.ngConfig.apps[0] &&
this.project.ngConfig.apps[0].prefix) {
defaultPrefix = this.project.ngConfig.apps[0].prefix;
}
let prefix = (this.options.prefix === 'false' || this.options.prefix === '')
? '' : (this.options.prefix || defaultPrefix);
prefix = prefix && `${prefix}-`;
this.selector = stringUtils.camelize(prefix + parsedPath.name);
return parsedPath.name;
},
示例3: function
run: function (commandOptions: any, rawArgs: string[]): Promise<void> {
(this as any)[stringUtils.camelize(this.name)](commandOptions, rawArgs);
return Promise.resolve();
},
示例4: function
run: function (commandOptions, rawArgs): Promise<void> {
this[stringUtils.camelize(this.name)](commandOptions, rawArgs);
return Promise.resolve();
},