Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

monoce

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monoce

Monoce - modern, fast, simple KV storage.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Monoce

Modern, fast, simple KV storage.

Installing

Using npm (or yarn):

$ npm install monoce # or yarn add monoce

Example

⚠️ Warning! - Currently, you can create database only this web site: https://www.monoce.com (later you can use self-hosted the Monoce)

Use for TypeScript:

import { MonoceInstance } from 'monoce'

Use for JavaScript:

const { MonoceInstance } = require('monoce')

❗ Worked copy-past example:

const monoce = new MonoceInstance({ database: 'monoce', token: '43d51bef-c1eb-43db-b961-58f4ad9a105e' })

const requestInitialization = async () => {
  const setRequest = await monoce.set({
    document: 'monoce',
    payload: {
      AnyJSONPayload: 'AnyJSONValue'
    }
  })

  console.log(setRequest)
  /** 
   * {
   *  AnyJSONPayload: 'AnyJSONValue'
   * }
  */

  const getRequest = await monoce.get({
    document: 'monoce'
  })

  console.log(getRequest)
  /** 
   * {
   *  AnyJSONPayload: 'AnyJSONValue'
   * }
  */

  const updateRequest = await monoce.update({
    document: 'monoce',
    payload: {
      AnyOtherJSONPayload: 'AnyOtherJSONValue'
    }
  })

  console.log(updateRequest)
  /** 
   * {
   *  AnyJSONPayload: 'AnyJSONValue',
   *  AnyOtherJSONPayload: 'AnyOtherJSONValue'
   * }
  */

  const deleteRequest = await monoce.delete({
    document: 'monoce'
  })

  console.log(deleteRequest)
  /** 
   * {
   *  databse: 'monoce',
   *  document: 'monoce'
   * }
  */

}

requestInitialization()

Keywords

FAQs

Package last updated on 26 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc