UNPKG

@magaya/hyperion-write-access

Version:
25 lines (16 loc) 728 B
# Hyperion Write Access [![CircleCI](https://circleci.com/gh/magaya-dev/hyperion-write-access.svg?style=svg)](https://circleci.com/gh/magaya-dev/hyperion-write-access) ## What is it? Write access wrapper for operations in hyperion. ## How to use it? Can be used as follows: ```js let hyperionConnection; // ... get raw hyperion object const WriteAccess = require('@magaya/hyperion-write-access'); const writer = new WriteAccess(hyperionConnection.async); // Needs methods in async // Get interface object let dbObject; // ... get object from hyperion let objectToModify = await writer.edit(dbObject); // Begin editing objectToModify let modifiedDbObject = await writer.save(objectToModify); ```