@jupyterlab/statedb
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
@@ -65,4 +65,4 @@ import { IObservableDisposable } from '@lumino/disposable'; | ||
* #### Notes | ||
* The object passed into the tracker is added synchronously; its existence in | ||
* the tracker can be checked with the `has()` method. The promise this method | ||
* The object passed into the pool is added synchronously; its existence in | ||
* the pool can be checked with the `has()` method. The promise this method | ||
* returns resolves after the object has been added and saved to an underlying | ||
@@ -69,0 +69,0 @@ * restoration connector, if one is available. |
@@ -98,4 +98,4 @@ "use strict"; | ||
* #### Notes | ||
* The object passed into the tracker is added synchronously; its existence in | ||
* the tracker can be checked with the `has()` method. The promise this method | ||
* The object passed into the pool is added synchronously; its existence in | ||
* the pool can be checked with the `has()` method. The promise this method | ||
* returns resolves after the object has been added and saved to an underlying | ||
@@ -102,0 +102,0 @@ * restoration connector, if one is available. |
@@ -188,4 +188,7 @@ import { ReadonlyPartialJSONValue } from '@lumino/coreutils'; | ||
* Retrieve the list of items available from the data connector. | ||
* | ||
* @param namespace - If not empty, only keys whose first token before `:` | ||
* exactly match `namespace` will be returned, e.g. `foo` in `foo:bar`. | ||
*/ | ||
list(query?: string): Promise<{ | ||
list(namespace?: string): Promise<{ | ||
ids: string[]; | ||
@@ -192,0 +195,0 @@ values: string[]; |
@@ -159,4 +159,4 @@ "use strict"; | ||
*/ | ||
async _list(query) { | ||
const { ids, values } = await this._connector.list(query); | ||
async _list(namespace = '') { | ||
const { ids, values } = await this._connector.list(namespace); | ||
return { | ||
@@ -213,6 +213,9 @@ ids, | ||
* Retrieve the list of items available from the data connector. | ||
* | ||
* @param namespace - If not empty, only keys whose first token before `:` | ||
* exactly match `namespace` will be returned, e.g. `foo` in `foo:bar`. | ||
*/ | ||
async list(query = '') { | ||
async list(namespace = '') { | ||
return Object.keys(this._storage).reduce((acc, val) => { | ||
if (val && val.indexOf(query) === 0) { | ||
if (namespace === '' ? true : namespace === val.split(':')[0]) { | ||
acc.ids.push(val); | ||
@@ -219,0 +222,0 @@ acc.values.push(this._storage[val]); |
{ | ||
"name": "@jupyterlab/statedb", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"description": "Package for managing state in Jupyterlab", | ||
@@ -34,7 +34,7 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"dependencies": { | ||
"@lumino/commands": "^1.9.0", | ||
"@lumino/coreutils": "^1.4.0", | ||
"@lumino/disposable": "^1.3.2", | ||
"@lumino/properties": "^1.1.4", | ||
"@lumino/signaling": "^1.3.2" | ||
"@lumino/commands": "^1.9.1", | ||
"@lumino/coreutils": "^1.4.2", | ||
"@lumino/disposable": "^1.3.4", | ||
"@lumino/properties": "^1.1.6", | ||
"@lumino/signaling": "^1.3.4" | ||
}, | ||
@@ -49,3 +49,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "3bbcf37b4e349a3783d20e3ead1fdaa92098715c" | ||
"gitHead": "4e4a0662846a9a987a97808c61593aa997da5b73" | ||
} |
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
59481
1347
Updated@lumino/commands@^1.9.1
Updated@lumino/coreutils@^1.4.2
Updated@lumino/disposable@^1.3.4
Updated@lumino/properties@^1.1.6
Updated@lumino/signaling@^1.3.4