Files
NapCatQQ/.pnpm-store/v3/files/90/76d63decae05efe7bd8111e4c545e95bd6127707cf8aa53ac82de88d45335ab40730bc642a57bd3d01df0256c288f0dfa3e86f0119fc40b3c744c04b1f7ec0
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

60 lines
1.2 KiB
Plaintext

declare namespace decamelize {
interface Options {
/**
Character or string inserted to separate words in `string`.
@default '_'
@example
```
import decamelize = require('decamelize');
decamelize('unicornRainbow');
//=> 'unicorn_rainbow'
decamelize('unicornRainbow', {separator: '-'});
//=> 'unicorn-rainbow'
```
*/
readonly separator?: string;
/**
Preserve sequences of uppercase characters.
@default false
@example
```
import decamelize = require('decamelize');
decamelize('testGUILabel');
//=> 'test_gui_label'
decamelize('testGUILabel', {preserveConsecutiveUppercase: true});
//=> 'test_GUI_label'
```
*/
readonly preserveConsecutiveUppercase?: boolean;
}
}
/**
Convert a camelized string into a lowercased one with a custom separator: `unicornRainbow` → `unicorn_rainbow`.
@param string - The camelcase string to decamelize.
@example
```
import decamelize = require('decamelize');
decamelize('unicornRainbow');
//=> 'unicorn_rainbow'
decamelize('unicornRainbow', {separator: '-'});
//=> 'unicorn-rainbow'
```
*/
declare function decamelize(string: string, options?: decamelize.Options): string;
export = decamelize;