aboutsummaryrefslogtreecommitdiff
path: root/node_modules/vuepress/lib/app/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/vuepress/lib/app/util.js')
-rw-r--r--node_modules/vuepress/lib/app/util.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/node_modules/vuepress/lib/app/util.js b/node_modules/vuepress/lib/app/util.js
new file mode 100644
index 00000000..c1117224
--- /dev/null
+++ b/node_modules/vuepress/lib/app/util.js
@@ -0,0 +1,19 @@
+export function injectMixins (options, mixins) {
+ if (!options.mixins) {
+ options.mixins = []
+ }
+ options.mixins.push(...mixins)
+}
+
+export function findPageForPath (pages, path) {
+ for (let i = 0; i < pages.length; i++) {
+ const page = pages[i]
+ if (page.path === path) {
+ return page
+ }
+ }
+ return {
+ path: '',
+ frontmatter: {}
+ }
+}