chore: move findExistingDefinition into own file

This commit is contained in:
Oscar 2020-02-17 00:05:36 +01:00
parent 7a74dc494d
commit e7002614c1
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,5 @@
const makeItemLink = (slug) => `#${slug}`; const makeItemLink = (slug) => `#${slug}`;
const findExistingDefinition = (word, collection) => const findExistingDefinition = require('./11ty/filters/helpers/findExistingDefinition');
collection.find((item) => item.data.title === word);
module.exports = function(config) { module.exports = function(config) {
// Add a filter using the Config API // Add a filter using the Config API

View File

@ -0,0 +1,2 @@
module.exports = (word, collection) =>
collection.find((item) => item.data.title === word);