@cjser/log-symbols__v5_1_0 5.1.0-cjser.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.js +8 -0
- package/dist-cjser/index.cjs +31 -0
- package/index.d.ts +22 -0
- package/index.js +20 -0
- package/license +9 -0
- package/package.json +87 -0
- package/readme.md +56 -0
package/browser.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/@cjser/log-symbols__v5_1_0.tmp-26-1778156626819/browser.js
|
|
20
|
+
var browser_exports = {};
|
|
21
|
+
__export(browser_exports, {
|
|
22
|
+
default: () => browser_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(browser_exports);
|
|
25
|
+
var logSymbols = {
|
|
26
|
+
info: "\u2139\uFE0F",
|
|
27
|
+
success: "\u2705",
|
|
28
|
+
warning: "\u26A0\uFE0F",
|
|
29
|
+
error: "\u274C\uFE0F"
|
|
30
|
+
};
|
|
31
|
+
var browser_default = logSymbols;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Colored symbols for various log levels.
|
|
3
|
+
|
|
4
|
+
Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
|
|
5
|
+
|
|
6
|
+
@example
|
|
7
|
+
```
|
|
8
|
+
import logSymbols from '@cjser/log-symbols__v5_1_0';
|
|
9
|
+
|
|
10
|
+
console.log(logSymbols.success, 'Finished successfully!');
|
|
11
|
+
// Terminals with Unicode support: ✔ Finished successfully!
|
|
12
|
+
// Terminals without Unicode support: √ Finished successfully!
|
|
13
|
+
```
|
|
14
|
+
*/
|
|
15
|
+
declare const logSymbols: {
|
|
16
|
+
readonly info: string;
|
|
17
|
+
readonly success: string;
|
|
18
|
+
readonly warning: string;
|
|
19
|
+
readonly error: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default logSymbols;
|
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import chalk from '@cjser/chalk';
|
|
2
|
+
import isUnicodeSupported from '@cjser/is-unicode-supported__v1_3_0';
|
|
3
|
+
|
|
4
|
+
const main = {
|
|
5
|
+
info: chalk.blue('ℹ'),
|
|
6
|
+
success: chalk.green('✔'),
|
|
7
|
+
warning: chalk.yellow('⚠'),
|
|
8
|
+
error: chalk.red('✖'),
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const fallback = {
|
|
12
|
+
info: chalk.blue('i'),
|
|
13
|
+
success: chalk.green('√'),
|
|
14
|
+
warning: chalk.yellow('‼'),
|
|
15
|
+
error: chalk.red('×'),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const logSymbols = isUnicodeSupported() ? main : fallback;
|
|
19
|
+
|
|
20
|
+
export default logSymbols;
|
package/license
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cjser/log-symbols__v5_1_0",
|
|
3
|
+
"version": "5.1.0-cjser.2",
|
|
4
|
+
"description": "Colored symbols for various log levels. Example: `✔︎ Success`",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://code.moenext.com/3rdeye/cjser.git"
|
|
9
|
+
},
|
|
10
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Sindre Sorhus",
|
|
13
|
+
"email": "sindresorhus@gmail.com",
|
|
14
|
+
"url": "https://sindresorhus.com"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
"require": "./dist-cjser/index.cjs",
|
|
19
|
+
"node": "./index.js",
|
|
20
|
+
"default": "./browser.js"
|
|
21
|
+
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=12"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "xo && ava && tsd"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"index.js",
|
|
30
|
+
"index.d.ts",
|
|
31
|
+
"browser.js",
|
|
32
|
+
"dist-cjser"
|
|
33
|
+
],
|
|
34
|
+
"keywords": [
|
|
35
|
+
"unicode",
|
|
36
|
+
"cli",
|
|
37
|
+
"cmd",
|
|
38
|
+
"command-line",
|
|
39
|
+
"characters",
|
|
40
|
+
"symbol",
|
|
41
|
+
"symbols",
|
|
42
|
+
"figure",
|
|
43
|
+
"figures",
|
|
44
|
+
"fallback",
|
|
45
|
+
"windows",
|
|
46
|
+
"log",
|
|
47
|
+
"logging",
|
|
48
|
+
"terminal",
|
|
49
|
+
"stdout"
|
|
50
|
+
],
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@cjser/chalk": "5.6.2-cjser.2",
|
|
53
|
+
"@cjser/is-unicode-supported__v1_3_0": "1.3.0-cjser.2"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"ava": "^3.15.0",
|
|
57
|
+
"strip-ansi": "^7.0.1",
|
|
58
|
+
"tsd": "^0.19.0",
|
|
59
|
+
"xo": "^0.47.0"
|
|
60
|
+
},
|
|
61
|
+
"main": "./dist-cjser/index.cjs",
|
|
62
|
+
"cjser": {
|
|
63
|
+
"sourceVersion": "5.1.0",
|
|
64
|
+
"cjserVersion": 2,
|
|
65
|
+
"original": {
|
|
66
|
+
"name": "log-symbols",
|
|
67
|
+
"version": "5.1.0",
|
|
68
|
+
"exports": {
|
|
69
|
+
"node": "./index.js",
|
|
70
|
+
"default": "./browser.js"
|
|
71
|
+
},
|
|
72
|
+
"repository": "sindresorhus/log-symbols",
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"chalk": "^5.0.0",
|
|
75
|
+
"is-unicode-supported": "^1.1.0"
|
|
76
|
+
},
|
|
77
|
+
"files": [
|
|
78
|
+
"index.js",
|
|
79
|
+
"index.d.ts",
|
|
80
|
+
"browser.js"
|
|
81
|
+
],
|
|
82
|
+
"scripts": {
|
|
83
|
+
"test": "xo && ava && tsd"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# log-symbols
|
|
2
|
+
|
|
3
|
+
<img src="screenshot.png" width="226" height="192" align="right">
|
|
4
|
+
|
|
5
|
+
> Colored symbols for various log levels
|
|
6
|
+
|
|
7
|
+
Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install log-symbols
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import logSymbols from 'log-symbols';
|
|
19
|
+
|
|
20
|
+
console.log(logSymbols.success, 'Finished successfully!');
|
|
21
|
+
// Terminals with Unicode support: ✔ Finished successfully!
|
|
22
|
+
// Terminals without Unicode support: √ Finished successfully!
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## API
|
|
26
|
+
|
|
27
|
+
### logSymbols
|
|
28
|
+
|
|
29
|
+
#### info
|
|
30
|
+
#### success
|
|
31
|
+
#### warning
|
|
32
|
+
#### error
|
|
33
|
+
|
|
34
|
+
## Related
|
|
35
|
+
|
|
36
|
+
- [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows CMD fallbacks
|
|
37
|
+
- [py-log-symbols](https://github.com/ManrajGrover/py-log-symbols) - Python port
|
|
38
|
+
- [log-symbols](https://github.com/palash25/log-symbols) - Ruby port
|
|
39
|
+
- [guumaster/logsymbols](https://github.com/guumaster/logsymbols) - Golang port
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
<div align="center">
|
|
44
|
+
<b>
|
|
45
|
+
<a href="https://tidelift.com/subscription/pkg/npm-log-symbols?utm_source=npm-log-symbols&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
|
46
|
+
</b>
|
|
47
|
+
<br>
|
|
48
|
+
<sub>
|
|
49
|
+
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
50
|
+
</sub>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
## cjser
|
|
54
|
+
|
|
55
|
+
This package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
|
|
56
|
+
Original repository: https://github.com/sindresorhus/log-symbols
|