@prm-programmer/safe-chalk 2.4.0 → 2.5.0

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -0
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License 
2
+
3
+ Copyright (c) 2026 rpm-programmer 
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions: 
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software. 
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ ### 🎨 @rpm-programmer/safe-chalk
2
+
3
+ Безопасное и удобное форматирование текста в консоли Node.js. Это аналог популярного модуля в npm - ***chalk***. В этом коде добавлена поддержка CommonJS (В оригинальном ***chalk*** новых версиях полностью перешли на export/import).
4
+
5
+ ### 🚀 Установка
6
+
7
+ Установите пакет в ваш проект с помощью одной команды: 
8
+
9
+ * npm install @rpm-programmer/safe-chalk
10
+
11
+ ### 💻 Быстрый старт
12
+
13
+ Просто импортируйте модуль и начните раскрашивать вывод в консоли: 
14
+
15
+ * // Подключение пакета (CommonJS)
16
+ * const safeChalk = require('@rpm-programmer/safe-chalk');
17
+ * // Или для ES Modules:
18
+ * // import safeChalk from '@rpm-programmer/safe-chalk';
19
+
20
+ * // Простые примеры
21
+ * console.log(safeChalk.green('✓ Операция успешно завершена!'));
22
+ * console.log(safeChalk.red('𐄂 Произошла критическая ошибка!'));
23
+
24
+ ### 🛠 API Reference
25
+
26
+ ### safeChalk.green(text)
27
+
28
+ Окрашивает переданный текст в зеленый цвет. 
29
+
30
+ * **Параметры:** text (string) — текст для форматирования.
31
+ * **Возвращает:** string — строку с ANSI-кодами.
32
+
33
+ ### safeChalk.rgBlue(text)
34
+
35
+ Окрашивает фон переданного текста в синий. 
36
+
37
+ * **Параметры:** text (string) — текст для форматирования.
38
+ * **Возвращает:** string — строку с ANSI-кодами.
39
+
40
+ ### safeChalk.rgBlue().red(text)
41
+
42
+ Окрашивает фон переданного текста в синий и его цвет в красный
43
+
44
+ * **Параметры:** text (string) — текст для форматирования.
45
+ * **Возвращает:** string — строку с ANSI-кодами.
46
+
47
+ ### 📄 Лицензия
48
+
49
+ Данный проект распространяется под лицензией [MIT](LICENSE).
50
+ Copyright © 2026 **rpm-programmer**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prm-programmer/safe-chalk",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {