![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@n3/browser-messages
Advanced tools
Всплывающие уведомления для приложений на базе @n3/kit
.
❗Если используется отдельно от @n3/kit
, необходимо подключить тему @n3/css-base
❗
import { theme } from '@n3/css-base/themes/theme-2';
import { setTheme } from '@n3/css-base';
setTheme(theme);
import { successLog } from '@n3/browser-messages';
successLog({
title: 'Успешно',
content: 'Действие прошло успешно',
});
import { errorLog } from '@n3/browser-messages';
errorLog({
title: 'Ошибка',
content: 'Действие прошло с ошибкой',
});
Название | Описание | Значение по умолчанию |
---|---|---|
title | Заголовок | |
content | Содержание | |
isAutoClose | Закрытие по таймауту | false |
timeout | Время показа до закрытия | 4500 |
zIndex | z-index fixed-элемента | 20 |
Выводит ошибку из поля detail
или non_field_errors
.
import axios from 'axios';
import { axiosErrorLog } from '@n3/browser-messages';
try {
await axios.post(...);
} catch (e) {
axiosErrorLog(e);
}
Аргументы:
axiosError
- обязательный, ошибка axios
;message
- необязательный, дополнительные параметры вывода сообщения;order
- необязательный, порядок, по которому в ответе производится поиск ошибки, по умолчанию ['detail', 'non_field_errors']
.FAQs
Browser messages for n3 interfaces
The npm package @n3/browser-messages receives a total of 189 weekly downloads. As such, @n3/browser-messages popularity was classified as not popular.
We found that @n3/browser-messages demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.