@luma.gl/shadertools
Version:
Shader module system for luma.gl
13 lines (11 loc) • 309 B
text/typescript
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
/**
* Capitalize first letter of a string
* @param {string} str
* @returns {string}
*/
export function capitalize(str: string): string {
return typeof str === 'string' ? str.charAt(0).toUpperCase() + str.slice(1) : str;
}