UNPKG
@ogasphere/theme-manager
Version:
latest (1.2.1)
1.2.1
1.2.0
1.1.0
A reusable theme management package for Next.js and Vite applications
@ogasphere/theme-manager
/
dist
/
core
/
theme-validator.js
7 lines
(6 loc)
•
253 B
JavaScript
View Raw
1
2
3
4
5
6
7
export
function
validateThemeId
(
themeId, availableThemes
) {
return
availableThemes.
some
(
(
theme
) =>
theme.
id
=== themeId); }
export
function
getThemeById
(
themeId, availableThemes
) {
return
availableThemes.
find
(
(
theme
) =>
theme.
id
=== themeId); }