UNPKG
@ztl-uwu/nuxt-content
Version:
latest (2.14.1)
2.14.1
2.14.0
2.13.9
2.13.8
2.13.7
2.13.6
2.13.5
Write your content inside your Nuxt app
content.nuxt.com
ztl-uwu/nuxt-content
@ztl-uwu/nuxt-content
/
dist
/
runtime
/
utils
/
config.js
8 lines
(7 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
export
function
makeIgnored
(
ignores
) {
const
rxAll = [
"/\\."
,
"/-"
, ...ignores.
filter
(
(
p
) =>
p)].
map
(
(
p
) =>
new
RegExp
(p));
return
function
isIgnored
(
key
) {
const
path =
"/"
+ key.
replace
(
/:/g
,
"/"
);
return
rxAll.
some
(
(
rx
) =>
rx.
test
(path)); }; }