Comparing version 1.3.2 to 1.4.0
@@ -97,4 +97,4 @@ /** This is your entry point to the API. It's exposed to the global scope unless you're using a module system such as browserify, in which case it's the exported object. */ | ||
export interface ObjectStore { | ||
/** The name of this object store. */ | ||
readonly name: string; | ||
/** The name of this object store. Settable only during upgrades. */ | ||
name: string; | ||
@@ -147,2 +147,7 @@ /** The key path of this object store. If this attribute is null, the application must provide a key for each modification operation. */ | ||
/** Returns a Promise of an IDBRequest object that (in a separate thread) finds either the given key or the primary key, if key is an IDBKeyRange. | ||
* @param key The key or key range that identifies the record to be retrieved. | ||
* @returns A promise that resolves with the item when the underlying get IDBRequest is successful. */ | ||
getKey(key: IDBKeyRange | IDBValidKey): Promise<any>; | ||
/** Returns a Promise of an IDBRequest object that (in a separate thread) resolves with record keys for all the objects matching the specified parameter or all record keys in the store if no parameters are given. | ||
@@ -149,0 +154,0 @@ * @param query Optional. A key or IDBKeyRange to be queried. If nothing is passed, this will default to a key range that selects all the records in this object store. |
@@ -44,2 +44,5 @@ 'use strict'; | ||
return this[targetProp][prop]; | ||
}, | ||
set: function(val) { | ||
this[targetProp][prop] = val; | ||
} | ||
@@ -160,2 +163,3 @@ }); | ||
'getAll', | ||
'getKey', | ||
'getAllKeys', | ||
@@ -162,0 +166,0 @@ 'count' |
{ | ||
"name": "idb", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "IndexedDB but with promises", | ||
@@ -5,0 +5,0 @@ "main": "lib/idb.js", |
@@ -40,3 +40,3 @@ # IndexedDB Promised | ||
const tx = db.transaction('keyval', 'readwrite'); | ||
tx.objectStore('keyval').clear(key); | ||
tx.objectStore('keyval').clear(); | ||
return tx.complete; | ||
@@ -43,0 +43,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import "babelify/node_modules/babel-core/node_modules/regenerator/runtime"; | ||
import regeneratorRuntime from "regenerator/runtime"; | ||
import assert from "assert"; | ||
@@ -3,0 +3,0 @@ import {Promise} from "es6-promise"; |
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
193889
10
690