本文整理汇总了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();
},