data-structure-typed 1.53.3 → 1.53.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +8 -8
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +8 -8
- package/dist/mjs/data-structures/linked-list/doubly-linked-list.d.ts +8 -8
- package/dist/mjs/data-structures/linked-list/doubly-linked-list.js +8 -8
- package/dist/umd/data-structure-typed.min.js.map +1 -1
- package/package.json +6 -6
- package/src/data-structures/linked-list/doubly-linked-list.ts +8 -8
- package/testToExample.ts +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
9
9
|
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
|
|
10
10
|
|
|
11
|
-
## [v1.53.
|
|
11
|
+
## [v1.53.4](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming)
|
|
12
12
|
|
|
13
13
|
### Changes
|
|
14
14
|
|
|
@@ -326,8 +326,8 @@ export declare class DoublyLinkedListNode<E = any> {
|
|
|
326
326
|
* cache.set('c', 3);
|
|
327
327
|
* cache.set('d', 4); // This will eliminate 'a'
|
|
328
328
|
*
|
|
329
|
-
* console.log(cache.get('a'))
|
|
330
|
-
*
|
|
329
|
+
* console.log(cache.get('a')); // undefined
|
|
330
|
+
* console.log(cache.get('b')); // 2
|
|
331
331
|
* console.log(cache.get('c')); // 3
|
|
332
332
|
* console.log(cache.get('d')); // 4
|
|
333
333
|
*
|
|
@@ -341,8 +341,8 @@ export declare class DoublyLinkedListNode<E = any> {
|
|
|
341
341
|
* cache.set('d', 4); // This will eliminate 'b'
|
|
342
342
|
*
|
|
343
343
|
* console.log(cache.get('a')); // 1
|
|
344
|
-
* console.log(cache.get('b'))
|
|
345
|
-
*
|
|
344
|
+
* console.log(cache.get('b')); // undefined
|
|
345
|
+
* console.log(cache.get('c')); // 3
|
|
346
346
|
* console.log(cache.get('d')); // 4
|
|
347
347
|
*
|
|
348
348
|
* // Should support updating existing keys
|
|
@@ -358,8 +358,8 @@ export declare class DoublyLinkedListNode<E = any> {
|
|
|
358
358
|
* cache.set('b', 2);
|
|
359
359
|
*
|
|
360
360
|
* console.log(cache.delete('a')); // true
|
|
361
|
-
* console.log(cache.get('a'))
|
|
362
|
-
*
|
|
361
|
+
* console.log(cache.get('a')); // undefined
|
|
362
|
+
* console.log(cache.size); // 1
|
|
363
363
|
*
|
|
364
364
|
* // Should support clearing cache
|
|
365
365
|
* cache.clear();
|
|
@@ -404,11 +404,11 @@ export declare class DoublyLinkedListNode<E = any> {
|
|
|
404
404
|
*
|
|
405
405
|
* // 3. Find first lyric when timestamp is less than first entry
|
|
406
406
|
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000);
|
|
407
|
-
* console.log(earlyTimeLyric)
|
|
407
|
+
* console.log(earlyTimeLyric); // undefined
|
|
408
408
|
*
|
|
409
409
|
* // 4. Find last lyric when timestamp is after last entry
|
|
410
410
|
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000);
|
|
411
|
-
*
|
|
411
|
+
* console.log(lateTimeLyric?.text); // 'And I will try to fix you'
|
|
412
412
|
* @example
|
|
413
413
|
* // cpu process schedules
|
|
414
414
|
* class Process {
|
|
@@ -335,8 +335,8 @@ exports.DoublyLinkedListNode = DoublyLinkedListNode;
|
|
|
335
335
|
* cache.set('c', 3);
|
|
336
336
|
* cache.set('d', 4); // This will eliminate 'a'
|
|
337
337
|
*
|
|
338
|
-
* console.log(cache.get('a'))
|
|
339
|
-
*
|
|
338
|
+
* console.log(cache.get('a')); // undefined
|
|
339
|
+
* console.log(cache.get('b')); // 2
|
|
340
340
|
* console.log(cache.get('c')); // 3
|
|
341
341
|
* console.log(cache.get('d')); // 4
|
|
342
342
|
*
|
|
@@ -350,8 +350,8 @@ exports.DoublyLinkedListNode = DoublyLinkedListNode;
|
|
|
350
350
|
* cache.set('d', 4); // This will eliminate 'b'
|
|
351
351
|
*
|
|
352
352
|
* console.log(cache.get('a')); // 1
|
|
353
|
-
* console.log(cache.get('b'))
|
|
354
|
-
*
|
|
353
|
+
* console.log(cache.get('b')); // undefined
|
|
354
|
+
* console.log(cache.get('c')); // 3
|
|
355
355
|
* console.log(cache.get('d')); // 4
|
|
356
356
|
*
|
|
357
357
|
* // Should support updating existing keys
|
|
@@ -367,8 +367,8 @@ exports.DoublyLinkedListNode = DoublyLinkedListNode;
|
|
|
367
367
|
* cache.set('b', 2);
|
|
368
368
|
*
|
|
369
369
|
* console.log(cache.delete('a')); // true
|
|
370
|
-
* console.log(cache.get('a'))
|
|
371
|
-
*
|
|
370
|
+
* console.log(cache.get('a')); // undefined
|
|
371
|
+
* console.log(cache.size); // 1
|
|
372
372
|
*
|
|
373
373
|
* // Should support clearing cache
|
|
374
374
|
* cache.clear();
|
|
@@ -413,11 +413,11 @@ exports.DoublyLinkedListNode = DoublyLinkedListNode;
|
|
|
413
413
|
*
|
|
414
414
|
* // 3. Find first lyric when timestamp is less than first entry
|
|
415
415
|
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000);
|
|
416
|
-
* console.log(earlyTimeLyric)
|
|
416
|
+
* console.log(earlyTimeLyric); // undefined
|
|
417
417
|
*
|
|
418
418
|
* // 4. Find last lyric when timestamp is after last entry
|
|
419
419
|
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000);
|
|
420
|
-
*
|
|
420
|
+
* console.log(lateTimeLyric?.text); // 'And I will try to fix you'
|
|
421
421
|
* @example
|
|
422
422
|
* // cpu process schedules
|
|
423
423
|
* class Process {
|
|
@@ -326,8 +326,8 @@ export declare class DoublyLinkedListNode<E = any> {
|
|
|
326
326
|
* cache.set('c', 3);
|
|
327
327
|
* cache.set('d', 4); // This will eliminate 'a'
|
|
328
328
|
*
|
|
329
|
-
* console.log(cache.get('a'))
|
|
330
|
-
*
|
|
329
|
+
* console.log(cache.get('a')); // undefined
|
|
330
|
+
* console.log(cache.get('b')); // 2
|
|
331
331
|
* console.log(cache.get('c')); // 3
|
|
332
332
|
* console.log(cache.get('d')); // 4
|
|
333
333
|
*
|
|
@@ -341,8 +341,8 @@ export declare class DoublyLinkedListNode<E = any> {
|
|
|
341
341
|
* cache.set('d', 4); // This will eliminate 'b'
|
|
342
342
|
*
|
|
343
343
|
* console.log(cache.get('a')); // 1
|
|
344
|
-
* console.log(cache.get('b'))
|
|
345
|
-
*
|
|
344
|
+
* console.log(cache.get('b')); // undefined
|
|
345
|
+
* console.log(cache.get('c')); // 3
|
|
346
346
|
* console.log(cache.get('d')); // 4
|
|
347
347
|
*
|
|
348
348
|
* // Should support updating existing keys
|
|
@@ -358,8 +358,8 @@ export declare class DoublyLinkedListNode<E = any> {
|
|
|
358
358
|
* cache.set('b', 2);
|
|
359
359
|
*
|
|
360
360
|
* console.log(cache.delete('a')); // true
|
|
361
|
-
* console.log(cache.get('a'))
|
|
362
|
-
*
|
|
361
|
+
* console.log(cache.get('a')); // undefined
|
|
362
|
+
* console.log(cache.size); // 1
|
|
363
363
|
*
|
|
364
364
|
* // Should support clearing cache
|
|
365
365
|
* cache.clear();
|
|
@@ -404,11 +404,11 @@ export declare class DoublyLinkedListNode<E = any> {
|
|
|
404
404
|
*
|
|
405
405
|
* // 3. Find first lyric when timestamp is less than first entry
|
|
406
406
|
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000);
|
|
407
|
-
* console.log(earlyTimeLyric)
|
|
407
|
+
* console.log(earlyTimeLyric); // undefined
|
|
408
408
|
*
|
|
409
409
|
* // 4. Find last lyric when timestamp is after last entry
|
|
410
410
|
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000);
|
|
411
|
-
*
|
|
411
|
+
* console.log(lateTimeLyric?.text); // 'And I will try to fix you'
|
|
412
412
|
* @example
|
|
413
413
|
* // cpu process schedules
|
|
414
414
|
* class Process {
|
|
@@ -334,8 +334,8 @@ export class DoublyLinkedListNode {
|
|
|
334
334
|
* cache.set('c', 3);
|
|
335
335
|
* cache.set('d', 4); // This will eliminate 'a'
|
|
336
336
|
*
|
|
337
|
-
* console.log(cache.get('a'))
|
|
338
|
-
*
|
|
337
|
+
* console.log(cache.get('a')); // undefined
|
|
338
|
+
* console.log(cache.get('b')); // 2
|
|
339
339
|
* console.log(cache.get('c')); // 3
|
|
340
340
|
* console.log(cache.get('d')); // 4
|
|
341
341
|
*
|
|
@@ -349,8 +349,8 @@ export class DoublyLinkedListNode {
|
|
|
349
349
|
* cache.set('d', 4); // This will eliminate 'b'
|
|
350
350
|
*
|
|
351
351
|
* console.log(cache.get('a')); // 1
|
|
352
|
-
* console.log(cache.get('b'))
|
|
353
|
-
*
|
|
352
|
+
* console.log(cache.get('b')); // undefined
|
|
353
|
+
* console.log(cache.get('c')); // 3
|
|
354
354
|
* console.log(cache.get('d')); // 4
|
|
355
355
|
*
|
|
356
356
|
* // Should support updating existing keys
|
|
@@ -366,8 +366,8 @@ export class DoublyLinkedListNode {
|
|
|
366
366
|
* cache.set('b', 2);
|
|
367
367
|
*
|
|
368
368
|
* console.log(cache.delete('a')); // true
|
|
369
|
-
* console.log(cache.get('a'))
|
|
370
|
-
*
|
|
369
|
+
* console.log(cache.get('a')); // undefined
|
|
370
|
+
* console.log(cache.size); // 1
|
|
371
371
|
*
|
|
372
372
|
* // Should support clearing cache
|
|
373
373
|
* cache.clear();
|
|
@@ -412,11 +412,11 @@ export class DoublyLinkedListNode {
|
|
|
412
412
|
*
|
|
413
413
|
* // 3. Find first lyric when timestamp is less than first entry
|
|
414
414
|
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000);
|
|
415
|
-
* console.log(earlyTimeLyric)
|
|
415
|
+
* console.log(earlyTimeLyric); // undefined
|
|
416
416
|
*
|
|
417
417
|
* // 4. Find last lyric when timestamp is after last entry
|
|
418
418
|
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000);
|
|
419
|
-
*
|
|
419
|
+
* console.log(lateTimeLyric?.text); // 'And I will try to fix you'
|
|
420
420
|
* @example
|
|
421
421
|
* // cpu process schedules
|
|
422
422
|
* class Process {
|