mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 14:57:56 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { CC_TO_LO, CC_TO_UP } from './camelCase.js';
|
||||
/** @internal */
|
||||
function converter(map) {
|
||||
return (value) => value
|
||||
? map[value.charCodeAt(0)] + value.slice(1)
|
||||
: '';
|
||||
}
|
||||
/**
|
||||
* @name stringLowerFirst
|
||||
* @summary Lowercase the first letter of a string
|
||||
* @description
|
||||
* Lowercase the first letter of a string
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* import { stringLowerFirst } from '@pezkuwi/util';
|
||||
*
|
||||
* stringLowerFirst('ABC'); // => 'aBC'
|
||||
* ```
|
||||
*/
|
||||
export const stringLowerFirst = /*#__PURE__*/ converter(CC_TO_LO);
|
||||
/**
|
||||
* @name stringUpperFirst
|
||||
* @summary Uppercase the first letter of a string
|
||||
* @description
|
||||
* Lowercase the first letter of a string
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* import { stringUpperFirst } from '@pezkuwi/util';
|
||||
*
|
||||
* stringUpperFirst('abc'); // => 'Abc'
|
||||
* ```
|
||||
*/
|
||||
export const stringUpperFirst = /*#__PURE__*/ converter(CC_TO_UP);
|
||||
Reference in New Issue
Block a user