-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
60 lines (45 loc) · 1.51 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const array = require('lodash/array');
const collection = require('lodash/collection');
const date = require('lodash/date');
const func = require('lodash/function');
const lang = require('lodash/lang');
const math = require('lodash/math');
const number = require('lodash/number');
const object = require('lodash/object');
const string = require('lodash/string');
const util = require('lodash/util');
module.exports = (eleventyConfig) => {
Object.keys(array).forEach(key => {
eleventyConfig.addFilter(`_${key}`, array[key]);
});
Object.keys(object).forEach(key => {
eleventyConfig.addFilter(`_${key}`, object[key]);
});
Object.keys(collection).forEach(key => {
eleventyConfig.addFilter(`_${key}`, collection[key]);
});
Object.keys(date).forEach(key => {
eleventyConfig.addFilter(`_${key}`, Date[key]);
});
Object.keys(collection).forEach(key => {
eleventyConfig.addFilter(`_${key}`, collection[key]);
});
Object.keys(func).forEach(key => {
eleventyConfig.addFilter(`_${key}`, func[key]);
});
Object.keys(lang).forEach(key => {
eleventyConfig.addFilter(`_${key}`, lang[key]);
});
Object.keys(math).forEach(key => {
eleventyConfig.addFilter(`_${key}`, math[key]);
});
Object.keys(string).forEach(key => {
eleventyConfig.addFilter(`_${key}`, string[key]);
});
Object.keys(number).forEach(key => {
eleventyConfig.addFilter(`_${key}`, number[key]);
});
Object.keys(util).forEach(key => {
eleventyConfig.addFilter(`_${key}`, util[key]);
});
};