Update linguist-languages to v7 (#6367)
* Update linguist-languages to v7 * Trigger build * Update * replace `includes` with `indexOf` * fix `exclude` * add `nodejs` back
This commit is contained in:
1 parent
370e827217
commit
5ce16eaa02
11 files changed
+123
-64
No files matched your search
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(linguistData, { extend, override }) {
|
||||
module.exports = function(linguistData, { extend, override, exclude }) {
|
||||
const language = {};
|
||||
|
||||
for (const key in linguistData) {
|
||||
@@ -14,6 +14,14 @@ module.exports = function(linguistData, { extend, override }) {
|
||||
}
|
||||
}
|
||||
|
||||
if (exclude) {
|
||||
for (const key in exclude) {
|
||||
language[key] = (language[key] || []).filter(
|
||||
value => (exclude[key] || []).indexOf(value) === -1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
for (const key in override) {
|
||||
language[key] = override[key];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user