doubly-linked-list-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.
|
@@ -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 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doubly-linked-list-typed",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.4",
|
|
4
4
|
"description": "Doubly Linked List. Javascript & Typescript Data Structure.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -64,6 +64,6 @@
|
|
|
64
64
|
"typescript": "^4.9.5"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"data-structure-typed": "^1.53.
|
|
67
|
+
"data-structure-typed": "^1.53.4"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -353,8 +353,8 @@ export class DoublyLinkedListNode<E = any> {
|
|
|
353
353
|
* cache.set('c', 3);
|
|
354
354
|
* cache.set('d', 4); // This will eliminate 'a'
|
|
355
355
|
*
|
|
356
|
-
* console.log(cache.get('a'))
|
|
357
|
-
*
|
|
356
|
+
* console.log(cache.get('a')); // undefined
|
|
357
|
+
* console.log(cache.get('b')); // 2
|
|
358
358
|
* console.log(cache.get('c')); // 3
|
|
359
359
|
* console.log(cache.get('d')); // 4
|
|
360
360
|
*
|
|
@@ -368,8 +368,8 @@ export class DoublyLinkedListNode<E = any> {
|
|
|
368
368
|
* cache.set('d', 4); // This will eliminate 'b'
|
|
369
369
|
*
|
|
370
370
|
* console.log(cache.get('a')); // 1
|
|
371
|
-
* console.log(cache.get('b'))
|
|
372
|
-
*
|
|
371
|
+
* console.log(cache.get('b')); // undefined
|
|
372
|
+
* console.log(cache.get('c')); // 3
|
|
373
373
|
* console.log(cache.get('d')); // 4
|
|
374
374
|
*
|
|
375
375
|
* // Should support updating existing keys
|
|
@@ -385,8 +385,8 @@ export class DoublyLinkedListNode<E = any> {
|
|
|
385
385
|
* cache.set('b', 2);
|
|
386
386
|
*
|
|
387
387
|
* console.log(cache.delete('a')); // true
|
|
388
|
-
* console.log(cache.get('a'))
|
|
389
|
-
*
|
|
388
|
+
* console.log(cache.get('a')); // undefined
|
|
389
|
+
* console.log(cache.size); // 1
|
|
390
390
|
*
|
|
391
391
|
* // Should support clearing cache
|
|
392
392
|
* cache.clear();
|
|
@@ -431,11 +431,11 @@ export class DoublyLinkedListNode<E = any> {
|
|
|
431
431
|
*
|
|
432
432
|
* // 3. Find first lyric when timestamp is less than first entry
|
|
433
433
|
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000);
|
|
434
|
-
* console.log(earlyTimeLyric)
|
|
434
|
+
* console.log(earlyTimeLyric); // undefined
|
|
435
435
|
*
|
|
436
436
|
* // 4. Find last lyric when timestamp is after last entry
|
|
437
437
|
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000);
|
|
438
|
-
*
|
|
438
|
+
* console.log(lateTimeLyric?.text); // 'And I will try to fix you'
|
|
439
439
|
* @example
|
|
440
440
|
* // cpu process schedules
|
|
441
441
|
* class Process {
|