Get the value of key and delete the key. This functionality is similar to get, except for the fact that it also deletes the key on success.
Parameters
Parameter | Type | Description |
---|---|---|
key | string | the key to get and delete |
Returns
Type | Resolves with | Rejected when |
---|---|---|
Promise<string> | On success, the promise resolves with the value of key. | If the key does not exist, the promise is rejected with an error. |