1.0.0-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee • Published 6 years ago
ghkv v1.0.0-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
ghkv
A key-value store for your CI/CD workflows. Backed by GitHub API.
API
const { GhkvDataStore } = require('ghkv')const store = new GhkvDataStore(options)
options.accessTokenAn access token used to access the GitHub APIoptions.ownerOwner of the repositoryoptions.repoRepository nameoptions.branchBranch used to store data, defaults to the default branch
const doc = store.doc<T>(key)
Retrieves a reference to the document by key.
doc.get(): Promise<T | undefined>
Retrieves the current document data.
doc.update(updater, options)
Updates the document.
updater: (data: T | undefined) => TThis function should return an updated document, given the original document. Note that it may be called more than once in case of a conflict due to concurrent updates.options.message(Optional) The commit message.
doc.set(data, options)
Updates the document.
dataData to set. In case of concurrent updates, last write wins.options.message(Optional) The commit message.
1.1.0-0
6 years ago
1.0.0-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
6 years ago
1.0.0-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
6 years ago
1.0.0-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
6 years ago
1.0.0-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
6 years ago