0.2.19 • Published 3 months ago
edge-server-tools v0.2.19
edge-server-utils
The Edge Wallet uses a variety of back-end micro-services, including encrypted key backup, exchange rates, mining fees, and so forth. Most of these services use an Express frontend talking touch a CouchDB database, so this library contains common utility functions for working with these technologies.
Cleaners:
asCouchDoc
- A cleaner for dealing with the_id
and_rev
fields CouchDB adds to documents.asHealingObject
- A cleaner for repairing damaged objects using default values.asMaybeConflictError
- Passes for a CouchDB conflict error.asMaybeExistsError
- Passes for a CouchDB item exists error.asMaybeNotFoundError
- Passes for a CouchDB item missing error.
CouchDB utilities:
bulkGet
- Nano forgot to implement this method for some reason.makeRollingDatabase
- Treats a collection of databases as a single large database, organized by date range.viewToStream
- Iterates over the documents in a database, partition, or view.
CouchDB setup tools:
setupDatabase
- Automatically creates a database, sets up replication and design documents, and subscribes to the changes feed.makeJsDesign
- Creates a JavaScript design document.makeMangoIndex
- Creates a Mango index design document.syncedDocument
- Watches a settings document for changes.
AggregateError tools:
AggregateError
- A ponyfill for the new ES2021 AggregateError type.promiseAny
- A ponyfill for the new ES2021Promise.any
method.stringifyError
- Turns an error into a string, with special handling forAggregateError
.
Other stuff:
forkChildren
- Used for Node.js clustering.errorCause
- Adds anerror.cause
property.matchJson
- Returnstrue
if two JSON-style objects match.makePeriodicTask
- Starts a periodic async task, with error handling and other features.
Deprecated stuff:
autoReplication
- Deprecated. Use the newsetupDatabase
stuff.createAdminUser
createRegularUser
forEachDocument
- Iterates over the documents in a Couch database. UseviewToStream
instead.
0.2.19
3 months ago
0.2.18
2 years ago
0.2.16
2 years ago
0.2.17
2 years ago
0.2.15
2 years ago
0.2.14
2 years ago
0.2.13
2 years ago
0.2.12
2 years ago
0.2.11
2 years ago
0.2.10
2 years ago
0.2.9
2 years ago
0.2.8
2 years ago
0.2.7
3 years ago
0.2.6
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.1
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago