@testring/utils
Advanced tools
+7
-0
@@ -21,2 +21,9 @@ "use strict"; | ||
| } | ||
| getFirstElement(offset = 0) { | ||
| const elementIndex = offset; | ||
| if (elementIndex >= this.array.length) { | ||
| return null; | ||
| } | ||
| return this.array[elementIndex]; | ||
| } | ||
| [Symbol.iterator]() { | ||
@@ -23,0 +30,0 @@ return this.array[Symbol.iterator](); |
+3
-0
@@ -28,3 +28,6 @@ "use strict"; | ||
| } | ||
| [Symbol.iterator]() { | ||
| return this.array[Symbol.iterator](); | ||
| } | ||
| } | ||
| exports.Stack = Stack; |
+2
-2
| { | ||
| "name": "@testring/utils", | ||
| "version": "0.2.6", | ||
| "version": "0.2.7", | ||
| "main": "./dist/index.js", | ||
@@ -13,3 +13,3 @@ "types": "./src/index.ts", | ||
| "dependencies": { | ||
| "@testring/types": "^0.2.6", | ||
| "@testring/types": "^0.2.7", | ||
| "@types/resolve": "0.0.8", | ||
@@ -16,0 +16,0 @@ "resolve": "1.8.1" |
+10
-0
@@ -24,2 +24,12 @@ export class Queue<T> { | ||
| public getFirstElement(offset: number = 0): T | null { | ||
| const elementIndex = offset; | ||
| if (elementIndex >= this.array.length) { | ||
| return null; | ||
| } | ||
| return this.array[elementIndex]; | ||
| } | ||
| [Symbol.iterator]() { | ||
@@ -26,0 +36,0 @@ return this.array[Symbol.iterator](); |
+4
-0
@@ -33,2 +33,6 @@ export class Stack<T> { | ||
| } | ||
| [Symbol.iterator]() { | ||
| return this.array[Symbol.iterator](); | ||
| } | ||
| } |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
7405
8.64%243
8.97%Updated