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

@roomservice/browser

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@roomservice/browser - npm Package Compare versions

Comparing version 0.4.0-4 to 0.4.0-5

5

dist/client.test.js

@@ -78,2 +78,7 @@ "use strict";

const room = client.room("my-room");
// @ts-ignore because trust me typescript, I am very wise and have
// been on this earth longer than thee, and I, the great programmer,
// know for certain that window.indexDB is, in fact, equal to
// wiggly-woggle-pop.
window.indexedDB = "wiggly-woggle-pop";
jest.spyOn(offline_1.default, "getDoc").mockImplementation(async (ref, doc) => {

@@ -80,0 +85,0 @@ return automerge_1.save(automerge_1.from({ name: "offlinedoc" }));

13

dist/doc-client.d.ts
import { Obj, Room, Session } from "./types";
/**
* // Init
* if (onServer) {
* if (!ctx) throw new Error();
*
* const { doc } = authorize(url, ctx)
* return { doc }
* }
*
* // setDoc and onSetDoc are noops on the server.
*
*
*/
export default class DocClient<T extends Obj> {

@@ -16,0 +3,0 @@ private readonly _peer;

18

dist/doc-client.js

@@ -16,15 +16,2 @@ "use strict";

}
/**
* // Init
* if (onServer) {
* if (!ctx) throw new Error();
*
* const { doc } = authorize(url, ctx)
* return { doc }
* }
*
* // setDoc and onSetDoc are noops on the server.
*
*
*/
class DocClient {

@@ -87,4 +74,5 @@ constructor(parameters) {

async restore() {
// We can't restore on the server.
if (typeof window === "undefined") {
// We can't restore on the server, or in environments
// where indexedb is not defined
if (typeof window === "undefined" || typeof indexedDB === "undefined") {
return {};

@@ -91,0 +79,0 @@ }

{
"name": "@roomservice/browser",
"version": "0.4.0-4",
"version": "0.4.0-5",
"main": "dist/index",

@@ -5,0 +5,0 @@ "types": "dist/index",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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