New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dittolive/ditto

Package Overview
Dependencies
Maintainers
7
Versions
615
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dittolive/ditto

Ditto let's you sync wothout the internet.'

  • 0.0.1-experimental.kb-2791-set-up-cd-for-js-sdk.1
  • npm
  • Socket score

Version published
Weekly downloads
710
decreased by-19.13%
Maintainers
7
Weekly downloads
 
Created
Source

Ditto JS SDK

Ditto is a cross platform SDK that allows mobile, web, and IoT apps to sync with and even without connectivity.


IMPORTANT: The Ditto JS SDK is currently in an early alpha stage. As such, it is neither complete nor stable. Expect the API to change at any time.


Getting Started

Add the Ditto NPM package to your project:

npm install --save @dittolive/ditto

You can then import it in your source and start using it:

import { Ditto } from '@dittolive/ditto'

(async () => {
  // Create a Ditto context:
  const identity = { environment: 'development', appName: 'live.ditto.playground', siteID: BigInt('123') }
  const ditto = await new Ditto(identity, 'playground')

  // Get hold of a collection:
  const cars = ditto.store.collection('cars')

  // Insert an entry:
  const fordBlack = {model: "Ford", color: "black"}
  await cars.insert({id: "ford-black-123", value: fordBlack})

  // Find an entry by ID:
  const foundFordBlack = await cars.findByID('ford-black-123')
  console.log(foundFordBlack)

  // Remove an entry:
  await cars.findByID('ford-black-123').remove()

  // Done:
  console.log("Done, over and out.")
})()

Ditto JS SDK is a commercial product. Please consult LICENSE.md within this package for license details.

Copyright © 2019 - 2021 DittoLive, Inc. All rights reserved.

FAQs

Package last updated on 12 Feb 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