Comparing version 4.0.0 to 4.1.0
@@ -10,6 +10,50 @@ # CHANGE LOG | ||
---- | ||
## [In Git - targetting v4.0.0](https://github.com/mattwynne/gosh/compare/v3.1.0...master) (Not released) | ||
## [In Git](https://github.com/mattwynne/gosh/compare/v4.1.0...master) (Not released) | ||
### Added | ||
* N/A | ||
### Changed | ||
* N/A | ||
### Deprecated | ||
* N/A | ||
### Removed | ||
* N/A | ||
### Fixed | ||
* N/A | ||
## [4.1.0](https://github.com/mattwynne/gosh/compare/v4.0.0...v4.1.0) | ||
### Added | ||
* DocumentStore#empty for deleting everything. Useful for testing. | ||
### Changed | ||
* N/A | ||
### Deprecated | ||
* N/A | ||
### Removed | ||
* N/A | ||
### Fixed | ||
* N/A | ||
## [v4.0.0](https://github.com/mattwynne/gosh/compare/v3.1.0...v4.0.0) | ||
### Added | ||
* DocumentStore#withIndexOfAll for indexing many-many relationships | ||
@@ -16,0 +60,0 @@ |
@@ -66,2 +66,12 @@ 'use strict' | ||
empty() { | ||
for (const id of this._documents.keys()) { | ||
for (const index of this._indices) { | ||
index.deleteId(id) | ||
} | ||
this._documents.delete(id) | ||
} | ||
return this | ||
} | ||
withIndex(makeKey) { | ||
@@ -68,0 +78,0 @@ return this._withExtraIndex(new MemoryIndex(doc => [makeKey(doc)])) |
@@ -57,2 +57,9 @@ 'use strict' | ||
}) | ||
it('can be emptied', () => { | ||
const dave = { uid: 'abcdef123' } | ||
const store = new DocumentStore(document => document.uid).put(dave).empty() | ||
const actual = store.get({ uid: 'abcdef123' }) | ||
assert.equal(actual, null) | ||
}) | ||
}) |
{ | ||
"name": "gosh", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Great Object Storage Hooray!", | ||
@@ -5,0 +5,0 @@ "main": "lib/gosh.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
32870818
13
507
0