Skip to content

Commit

Permalink
fix: Allow "node" as a valid term (#47)
Browse files Browse the repository at this point in the history
Node word is used widely in tons of different contexts, does't make much sense to infer that it is related with Node.js. Examples:

- Node as part of a graph
- Node as machine part of a cluster

Keep checking "Node.js" for syntax and casing.
  • Loading branch information
joaoestrela committed Aug 4, 2022
1 parent 18cfb94 commit 4c3e2e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terms.jsonc
Expand Up @@ -39,7 +39,7 @@
"YouTube",
["Common[ .]js", "CommonJS"],
["JSDocs?", "JSDoc"],
["Node(?:js)?", "Node.js"],
["Node[ .]js", "Node.js"],
["React[ .]js", "React"],
["SauceLabs", "Sauce Labs"],
["StackOverflow", "Stack Overflow"],
Expand Down
2 changes: 1 addition & 1 deletion test.js
Expand Up @@ -51,7 +51,7 @@ describe('getTerms', () => {
});

it('should remove the excluded terms (defined as Array)', () => {
const result = getTerms(true, [], ['Node(?:js)?']);
const result = getTerms(true, [], ['Node[ .]js']);
expect(result).toBeTruthy();
expect(
result.some(term => Array.isArray(term) && term[1] === 'Node.js')
Expand Down

0 comments on commit 4c3e2e0

Please sign in to comment.