Replace CDN React/ReactDOM/Babel with local libs; remove Babel and inline scripts Build Tailwind locally, add safelist; switch to assets/tailwind.css Self-host Font Awesome and Inter (CSS + woff2); remove external font CDNs Implement strict CSP (no unsafe-inline/eval; scripts/styles/fonts from self) Extract inline handlers; move PWA scripts to external files Add local QR code generation (qrcode lib) and remove api.qrserver.com Improve SessionTypeSelector visual selection (highlighted background and ring) Keep PWA working with service worker and offline assets Refs: CSP hardening, offline-first, no external dependencies
64 lines
1.3 KiB
TypeScript
64 lines
1.3 KiB
TypeScript
declare namespace camelcase {
|
|
interface Options {
|
|
/**
|
|
Uppercase the first character: `foo-bar` → `FooBar`.
|
|
|
|
@default false
|
|
*/
|
|
readonly pascalCase?: boolean;
|
|
}
|
|
}
|
|
|
|
declare const camelcase: {
|
|
/**
|
|
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`.
|
|
|
|
@param input - String to convert to camel case.
|
|
|
|
@example
|
|
```
|
|
import camelCase = require('camelcase');
|
|
|
|
camelCase('foo-bar');
|
|
//=> 'fooBar'
|
|
|
|
camelCase('foo_bar');
|
|
//=> 'fooBar'
|
|
|
|
camelCase('Foo-Bar');
|
|
//=> 'fooBar'
|
|
|
|
camelCase('Foo-Bar', {pascalCase: true});
|
|
//=> 'FooBar'
|
|
|
|
camelCase('--foo.bar', {pascalCase: false});
|
|
//=> 'fooBar'
|
|
|
|
camelCase('foo bar');
|
|
//=> 'fooBar'
|
|
|
|
console.log(process.argv[3]);
|
|
//=> '--foo-bar'
|
|
camelCase(process.argv[3]);
|
|
//=> 'fooBar'
|
|
|
|
camelCase(['foo', 'bar']);
|
|
//=> 'fooBar'
|
|
|
|
camelCase(['__foo__', '--bar'], {pascalCase: true});
|
|
//=> 'FooBar'
|
|
```
|
|
*/
|
|
(input: string | ReadonlyArray<string>, options?: camelcase.Options): string;
|
|
|
|
// TODO: Remove this for the next major release, refactor the whole definition to:
|
|
// declare function camelcase(
|
|
// input: string | ReadonlyArray<string>,
|
|
// options?: camelcase.Options
|
|
// ): string;
|
|
// export = camelcase;
|
|
default: typeof camelcase;
|
|
};
|
|
|
|
export = camelcase;
|