How to use the es5-ext/string/#/capitalize.call function in es5-ext

To help you get started, we’ve selected a few es5-ext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github medikoo / serverless-plugin-dynamodb-autoscaling / index.js View on Github external
generateDimensionResources(mode, config, tableResourceName, indexName = null) {
		const modeCapitalized = capitalize.call(mode);
		const resourceNamePrefix = `${ tableResourceName }${ resolveIndexToken(indexName) }${
			modeCapitalized
		}`;

		const targetResourceName = `${ resourceNamePrefix }ScalableTarget`;
		const policyResourceName = `${ resourceNamePrefix }ScalingPolicy`;
		const resourceAddress = ["table", { Ref: tableResourceName }];
		if (indexName) resourceAddress.push("index", indexName);

		const roleARN = this.pluginConfig.iamRoleArn || {
			"Fn::GetAtt": `${ this.iamRoleResourceId }.Arn`
		};

		const resources = {
			[targetResourceName]: {
				Type: "AWS::ApplicationAutoScaling::ScalableTarget",
github medikoo / serverless-plugin-dynamodb-autoscaling / lib / generate-resources / dimension.js View on Github external
module.exports = (mode, config, tableResourceName, indexName = null) => {
	const modeCapitalized = capitalize.call(mode);
	const resourceNamePrefix = `${ tableResourceName }${ resolveIndexToken(
		indexName
	) }${ modeCapitalized }`;

	const targetResourceName = `${ resourceNamePrefix }ScalableTarget`;
	const policyResourceName = `${ resourceNamePrefix }ScalingPolicy`;
	const resourceAddress = ["table", { Ref: tableResourceName }];
	if (indexName) resourceAddress.push("index", indexName);

	const resources = {
		[targetResourceName]: {
			Type: "AWS::ApplicationAutoScaling::ScalableTarget",
			Properties: {
				MaxCapacity: config.maxCapacity,
				MinCapacity: config.minCapacity,
				ResourceId: { "Fn::Join": ["/", resourceAddress] },