fix(devDeps); fix(Iterator): get value - undefined
This commit is contained in:
10
README.md
10
README.md
@ -5,7 +5,7 @@ A data structures library based on iterators, inspired by libstdc++
|
||||
## Operators
|
||||
|
||||
| Operator | Naming |
|
||||
| ----------- | ------ |
|
||||
| ----------- | ------------- |
|
||||
| `+` | add |
|
||||
| `-` | sub |
|
||||
| `++obj` | inc |
|
||||
@ -15,10 +15,10 @@ A data structures library based on iterators, inspired by libstdc++
|
||||
| `%` | mod |
|
||||
| `==` | eq |
|
||||
| `!=` | neq |
|
||||
| `<` | lt |
|
||||
| `>` | gt |
|
||||
| `<=` | lte |
|
||||
| `>=` | gte |
|
||||
| `<` | a.cmp(b) < 0 |
|
||||
| `>` | a.cmp(b) > 0 |
|
||||
| `<=` | a.cmp(b) <= 0 |
|
||||
| `>=` | a.cmp(b) >= 0 |
|
||||
| `&&` | and |
|
||||
| `=` const & | copy |
|
||||
| `=` && | move |
|
||||
|
||||
785
package-lock.json
generated
785
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@
|
||||
"author": "Vlad Litvinov <vlad@sek1.ro>",
|
||||
"license": "LGPL-3.0-only",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"devDependencies": {
|
||||
"vitest": "^3.1.1"
|
||||
}
|
||||
}
|
||||
@ -6,7 +6,7 @@ export class ForwardIterator {
|
||||
}
|
||||
|
||||
get value() {
|
||||
return this.deref().value
|
||||
return this.deref()?.value
|
||||
}
|
||||
|
||||
set value(value) {
|
||||
|
||||
@ -49,6 +49,7 @@ test('move, empty', () => {
|
||||
|
||||
test('constructor, assign', () => {
|
||||
expect(new List().size()).toEqual(0)
|
||||
expect(new List().back).toEqual(undefined)
|
||||
expect(listEquArray(new List(null), [null])).toBeTruthy()
|
||||
expect(listEquArray(new List(null, 2), [null, null])).toBeTruthy()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user