data-structure-typed
Advanced tools
Comparing version 1.53.3 to 1.53.4
@@ -11,3 +11,3 @@ # Changelog | ||
## [v1.53.3](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming) | ||
## [v1.53.4](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming) | ||
@@ -14,0 +14,0 @@ ### Changes |
@@ -329,4 +329,4 @@ /** | ||
* | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.get('b')); // 2 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.get('b')); // 2 | ||
* console.log(cache.get('c')); // 3 | ||
@@ -345,4 +345,4 @@ * console.log(cache.get('d')); // 4 | ||
* console.log(cache.get('a')); // 1 | ||
* console.log(cache.get('b')).toBeUndefined(); | ||
* expect(cache.get('c')); // 3 | ||
* console.log(cache.get('b')); // undefined | ||
* console.log(cache.get('c')); // 3 | ||
* console.log(cache.get('d')); // 4 | ||
@@ -363,4 +363,4 @@ * | ||
* console.log(cache.delete('a')); // true | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.size); // 1 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.size); // 1 | ||
* | ||
@@ -410,7 +410,7 @@ * // Should support clearing cache | ||
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000); | ||
* console.log(earlyTimeLyric).toBeUndefined(); | ||
* console.log(earlyTimeLyric); // undefined | ||
* | ||
* // 4. Find last lyric when timestamp is after last entry | ||
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000); | ||
* expect(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* console.log(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* @example | ||
@@ -417,0 +417,0 @@ * // cpu process schedules |
@@ -338,4 +338,4 @@ "use strict"; | ||
* | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.get('b')); // 2 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.get('b')); // 2 | ||
* console.log(cache.get('c')); // 3 | ||
@@ -354,4 +354,4 @@ * console.log(cache.get('d')); // 4 | ||
* console.log(cache.get('a')); // 1 | ||
* console.log(cache.get('b')).toBeUndefined(); | ||
* expect(cache.get('c')); // 3 | ||
* console.log(cache.get('b')); // undefined | ||
* console.log(cache.get('c')); // 3 | ||
* console.log(cache.get('d')); // 4 | ||
@@ -372,4 +372,4 @@ * | ||
* console.log(cache.delete('a')); // true | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.size); // 1 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.size); // 1 | ||
* | ||
@@ -419,7 +419,7 @@ * // Should support clearing cache | ||
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000); | ||
* console.log(earlyTimeLyric).toBeUndefined(); | ||
* console.log(earlyTimeLyric); // undefined | ||
* | ||
* // 4. Find last lyric when timestamp is after last entry | ||
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000); | ||
* expect(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* console.log(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* @example | ||
@@ -426,0 +426,0 @@ * // cpu process schedules |
@@ -329,4 +329,4 @@ /** | ||
* | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.get('b')); // 2 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.get('b')); // 2 | ||
* console.log(cache.get('c')); // 3 | ||
@@ -345,4 +345,4 @@ * console.log(cache.get('d')); // 4 | ||
* console.log(cache.get('a')); // 1 | ||
* console.log(cache.get('b')).toBeUndefined(); | ||
* expect(cache.get('c')); // 3 | ||
* console.log(cache.get('b')); // undefined | ||
* console.log(cache.get('c')); // 3 | ||
* console.log(cache.get('d')); // 4 | ||
@@ -363,4 +363,4 @@ * | ||
* console.log(cache.delete('a')); // true | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.size); // 1 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.size); // 1 | ||
* | ||
@@ -410,7 +410,7 @@ * // Should support clearing cache | ||
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000); | ||
* console.log(earlyTimeLyric).toBeUndefined(); | ||
* console.log(earlyTimeLyric); // undefined | ||
* | ||
* // 4. Find last lyric when timestamp is after last entry | ||
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000); | ||
* expect(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* console.log(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* @example | ||
@@ -417,0 +417,0 @@ * // cpu process schedules |
@@ -337,4 +337,4 @@ import { IterableElementBase } from '../base'; | ||
* | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.get('b')); // 2 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.get('b')); // 2 | ||
* console.log(cache.get('c')); // 3 | ||
@@ -353,4 +353,4 @@ * console.log(cache.get('d')); // 4 | ||
* console.log(cache.get('a')); // 1 | ||
* console.log(cache.get('b')).toBeUndefined(); | ||
* expect(cache.get('c')); // 3 | ||
* console.log(cache.get('b')); // undefined | ||
* console.log(cache.get('c')); // 3 | ||
* console.log(cache.get('d')); // 4 | ||
@@ -371,4 +371,4 @@ * | ||
* console.log(cache.delete('a')); // true | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.size); // 1 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.size); // 1 | ||
* | ||
@@ -418,7 +418,7 @@ * // Should support clearing cache | ||
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000); | ||
* console.log(earlyTimeLyric).toBeUndefined(); | ||
* console.log(earlyTimeLyric); // undefined | ||
* | ||
* // 4. Find last lyric when timestamp is after last entry | ||
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000); | ||
* expect(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* console.log(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* @example | ||
@@ -425,0 +425,0 @@ * // cpu process schedules |
{ | ||
"name": "data-structure-typed", | ||
"version": "1.53.3", | ||
"version": "1.53.4", | ||
"description": "Javascript Data Structure. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree(BST), AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack. Benchmark compared with C++ STL. API aligned with ES6 and Java.util. Usability is comparable to Python", | ||
@@ -73,7 +73,7 @@ "main": "dist/cjs/index.js", | ||
"auto-changelog": "^2.5.0", | ||
"avl-tree-typed": "^1.53.2", | ||
"avl-tree-typed": "^1.53.3", | ||
"benchmark": "^2.1.4", | ||
"binary-tree-typed": "^1.53.2", | ||
"bst-typed": "^1.53.2", | ||
"data-structure-typed": "^1.53.2", | ||
"binary-tree-typed": "^1.53.3", | ||
"bst-typed": "^1.53.3", | ||
"data-structure-typed": "^1.53.3", | ||
"dependency-cruiser": "^16.5.0", | ||
@@ -87,3 +87,3 @@ "doctoc": "^2.2.1", | ||
"fast-glob": "^3.3.2", | ||
"heap-typed": "^1.53.2", | ||
"heap-typed": "^1.53.3", | ||
"istanbul-badges-readme": "^1.9.0", | ||
@@ -90,0 +90,0 @@ "jest": "^29.7.0", |
@@ -356,4 +356,4 @@ /** | ||
* | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.get('b')); // 2 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.get('b')); // 2 | ||
* console.log(cache.get('c')); // 3 | ||
@@ -372,4 +372,4 @@ * console.log(cache.get('d')); // 4 | ||
* console.log(cache.get('a')); // 1 | ||
* console.log(cache.get('b')).toBeUndefined(); | ||
* expect(cache.get('c')); // 3 | ||
* console.log(cache.get('b')); // undefined | ||
* console.log(cache.get('c')); // 3 | ||
* console.log(cache.get('d')); // 4 | ||
@@ -390,4 +390,4 @@ * | ||
* console.log(cache.delete('a')); // true | ||
* console.log(cache.get('a')).toBeUndefined(); | ||
* expect(cache.size); // 1 | ||
* console.log(cache.get('a')); // undefined | ||
* console.log(cache.size); // 1 | ||
* | ||
@@ -437,7 +437,7 @@ * // Should support clearing cache | ||
* const earlyTimeLyric = lyricsList.findBackward(lyric => lyric.time <= -1000); | ||
* console.log(earlyTimeLyric).toBeUndefined(); | ||
* console.log(earlyTimeLyric); // undefined | ||
* | ||
* // 4. Find last lyric when timestamp is after last entry | ||
* const lateTimeLyric = lyricsList.findBackward(lyric => lyric.time <= 50000); | ||
* expect(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* console.log(lateTimeLyric?.text); // 'And I will try to fix you' | ||
* @example | ||
@@ -444,0 +444,0 @@ * // cpu process schedules |
@@ -63,2 +63,9 @@ import fs from 'fs'; | ||
.replace( | ||
/expect\((.*?)\)\.(toBeUndefined|toBeNull)\(\);/g, | ||
(match, actual, method) => { | ||
const expectedValue = method === 'toBeUndefined' ? 'undefined' : 'null'; | ||
return `console.log(${actual}); // ${expectedValue}`; | ||
} | ||
) | ||
.replace( | ||
/expect\((.*?)\)\.(toEqual|toBe|toStrictEqual|toHaveLength|toMatchObject)\((.*?)\);/gs, // Use `s` flag for multiline | ||
@@ -70,9 +77,2 @@ (match, actual, method, expected) => { | ||
) | ||
.replace( | ||
/expect\((.*?)\)\.(toBeUndefined|toBeNull)\(\);/g, | ||
(match, actual, method) => { | ||
const expectedValue = method === 'toBeUndefined' ? 'undefined' : 'null'; | ||
return `console.log(${actual}); // ${expectedValue}`; | ||
} | ||
) | ||
.trim(); | ||
@@ -79,0 +79,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5597849