1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 | Object.defineProperty(exports, "__esModule", { value: true });
|
6 | exports.deprecated = exports.string2varname = exports.filename2varname = exports.stripQuotation = void 0;
|
7 | function stripQuotation(str) {
|
8 | return str.replace(/^['"](.*?)['"]$/g, '$1');
|
9 | }
|
10 | exports.stripQuotation = stripQuotation;
|
11 | function filename2varname(filename) {
|
12 | return string2varname(filename.replace(/(?=.*)\.\w+$/, '').replace(/\.st$/, ''));
|
13 | }
|
14 | exports.filename2varname = filename2varname;
|
15 | function string2varname(str) {
|
16 | return str.replace(/[^0-9a-zA-Z_]/gm, '').replace(/^[^a-zA-Z_]+/gm, '');
|
17 | }
|
18 | exports.string2varname = string2varname;
|
19 | const deprecatedCache = {};
|
20 | function deprecated(staticMessage) {
|
21 | if (!deprecatedCache[staticMessage]) {
|
22 | deprecatedCache[staticMessage] = true;
|
23 | try {
|
24 | console.warn('DEPRECATED: ' + staticMessage);
|
25 | }
|
26 | catch {
|
27 |
|
28 | }
|
29 | }
|
30 | }
|
31 | exports.deprecated = deprecated;
|
32 |
|
\ | No newline at end of file |