You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
501 B
JavaScript
17 lines
501 B
JavaScript
'use strict';
|
|
|
|
module.exports = function filterAllModules(stack) {
|
|
return stack.map((stackLine) => {
|
|
if (stackLine.file.includes("/node_modules/") || stackLine.file.includes("\\node_modules\\") || (!stackLine.file.includes("/") && !stackLine.file.includes("\\"))) {
|
|
return {
|
|
type: "ignored",
|
|
count: 1
|
|
}
|
|
} else {
|
|
return Object.assign({
|
|
type: "stack"
|
|
}, stackLine);
|
|
}
|
|
});
|
|
};
|