A key-value store and a test framework

Hey, wanted to share these two tools:

store.js

A key-value store that persists data between scripts / runs. It uses extended attributes on a file as a store (and allows multiple stores). ~8ms per operation (on an XS max with string data). Supports objects, numbers, etc. The API is very similar to the one localStorage uses. Switch the iCloud FM to local if you don’t want to use iCloud (although extended attributes don’t sync to iCloud anyway). See example usage in test file at the bottom of the post.

test.js

A small test framework with jest-esque syntax. Supports describe + test (/it) functions (for suites, individual tests), times the tests. Return a boolean value from test as the assertion.

Example test (and store.js usage):

3 Likes