From eb36e2de62cce99222c3bd0377099c3da41ea5d3 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Date: Thu, 21 Apr 2022 03:08:38 -0300 Subject: [PATCH] merge: Format codebase with `standard.js` (#989) * Auto-update DIRECTORY.md * fix: some redundancy according to standard javascript library Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> --- DIRECTORY.md | 2 +- Data-Structures/Tree/Trie.js | 2 +- Maths/test/EulerMethod.manual-test.js | 2 +- Sorts/TopologicalSort.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index 8613c684c..c9b08760a 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -77,7 +77,7 @@ * [CycleDetection](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/CycleDetection.js) * [DoublyLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/DoublyLinkedList.js) * [RotateListRight](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/RotateListRight.js) - * [SingleCircularLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/SingleCircularLinkedList.js.js) + * [SinglyCircularLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/SinglyCircularLinkedList.js) * [SinglyLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/SinglyLinkedList.js) * Queue * [CircularQueue](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Queue/CircularQueue.js) diff --git a/Data-Structures/Tree/Trie.js b/Data-Structures/Tree/Trie.js index a1d34d063..04603f63b 100644 --- a/Data-Structures/Tree/Trie.js +++ b/Data-Structures/Tree/Trie.js @@ -18,7 +18,7 @@ function Trie () { Trie.findAllWords = function (root, word, output) { if (root === null) return if (root.count > 0) { - if (typeof output === 'object') { output.push({ word: word, count: root.count }) } + if (typeof output === 'object') { output.push({ word, count: root.count }) } } let key for (key in root.children) { diff --git a/Maths/test/EulerMethod.manual-test.js b/Maths/test/EulerMethod.manual-test.js index 8dd5b375b..49d6abe34 100644 --- a/Maths/test/EulerMethod.manual-test.js +++ b/Maths/test/EulerMethod.manual-test.js @@ -18,7 +18,7 @@ function plotLine (label, points, width, height) { type: 'scatter', data: { datasets: [{ - label: label, + label, data: points, showLine: true, fill: false, diff --git a/Sorts/TopologicalSort.js b/Sorts/TopologicalSort.js index 7bbc032c4..589044953 100644 --- a/Sorts/TopologicalSort.js +++ b/Sorts/TopologicalSort.js @@ -42,7 +42,7 @@ export function TopologicalSorter () { } finishingTimeList.push({ - node: node, + node, finishTime: ++finishTimeCount }) }