1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.styler = void 0;
|
4 | var handleStyle_1 = require("./handleStyle");
|
5 | var utils_1 = require("./utils");
|
6 | /**
|
7 | * this function is not browser compatible*.
|
8 | * @example ```ts
|
9 | * console.log(styler('test', 'red'))
|
10 | * ```
|
11 | *
|
12 | * *you have to add the styles manually, use the Log function for browser compatibly.
|
13 | */
|
14 | function styler(input, style) {
|
15 | if (utils_1.isBrowser) {
|
16 | return "%c" + input;
|
17 | }
|
18 | if (style) {
|
19 | return handleStyle_1.addReset("" + handleStyle_1.getNodeStyle(style) + input);
|
20 | }
|
21 | return input;
|
22 | }
|
23 | exports.styler = styler;
|