mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-02-04 18:41:52 +08:00
Upgrade dependencies and fix ESLint issues.
This commit is contained in:
@@ -54,7 +54,7 @@ export default class Stack {
|
||||
toArray() {
|
||||
return this.linkedList
|
||||
.toArray()
|
||||
.map(linkedListNode => linkedListNode.value);
|
||||
.map((linkedListNode) => linkedListNode.value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('Stack', () => {
|
||||
stack.push({ value: 'test1', key: 'key1' });
|
||||
stack.push({ value: 'test2', key: 'key2' });
|
||||
|
||||
const stringifier = value => `${value.key}:${value.value}`;
|
||||
const stringifier = (value) => `${value.key}:${value.value}`;
|
||||
|
||||
expect(stack.toString(stringifier)).toBe('key2:test2,key1:test1');
|
||||
expect(stack.pop().value).toBe('test2');
|
||||
|
||||
Reference in New Issue
Block a user