3.0.7 • Published 2 years ago
@glidepro/store v3.0.7
Install
npm i @glidepro/store --save
Setup
Add or amend your environment file to include:
STORE_AWS_SECRET_ACCESS_KEYSTORE_AWS_ACCESS_KEY_IDSTORE_AWS_S3_BUCKET
AWS
The library requires permissions to use the following S3 commands:
GetObjectPutObjectDeleteObject
Usage
All commands return a Promise.
const { set, get, hset, hgetall } = require("@glidepro/store");
const test = async () => {
await set("test:string", "this is a string!");
await hset("test:hash", { field: "of cows" });
console.log(await get("test:string")); // this is a string!
console.log(await hgetall("test:hash")); // { field: 'of cows' }
};
test();Supported commands
Generic
existsdelttlexpirepersist
Hash
hdelhgetallhkeyshvalshlenhincrbyhincrbyfloathsethsetnxhrandfieldhgethmgethexistshstrlen
Set
saddsremscardsismembersmembers
String
getset
Differences
Note this is not an exhaustive list, yet.
- hashes are stored as whole JSON objects, e.g.
HSET key valueallowsvalueto be an array, object, number, string or boolean and it will be stored in that format rather than being forced to string or being required to stringify prior to issuing the command.
3.0.7
2 years ago
3.0.6
3 years ago
3.0.5
3 years ago
3.0.4
3 years ago
3.0.3
3 years ago
3.0.2
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago