From 4c3e2e0794b934ab3c2045da0f11f915b2b5ab6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Estrela?= <6763969+Evilong@users.noreply.github.com> Date: Thu, 4 Aug 2022 07:46:40 +0100 Subject: [PATCH] fix: Allow "node" as a valid term (#47) 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. --- terms.jsonc | 2 +- test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/terms.jsonc b/terms.jsonc index 5022143..e7d8d94 100644 --- a/terms.jsonc +++ b/terms.jsonc @@ -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"], diff --git a/test.js b/test.js index a94c039..300bab3 100644 --- a/test.js +++ b/test.js @@ -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')