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

gongo-client-react

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gongo-client-react - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

lib/liveQueries.d.ts

@@ -10,4 +10,4 @@ import { Database, Cursor } from "gongo-client";

declare const useGongoOne: <DocType extends Document>(origCursorFunc: false | "" | CursorFunc<DocType> | null | undefined, opts?: useGongoCursorOpts) => import("gongo-client/lib/browser/Collection").WithId<DocType> | null;
declare function useGongoUserId(): unknown;
declare function useGongoUserId(): string | null;
export { useGongoCursor, useGongoLive, useGongoOne, useGongoUserId };
//# sourceMappingURL=liveQueries.d.ts.map

@@ -78,4 +78,6 @@ "use strict";

const data = useGongoLive(cursorFunc /*, opts */);
return data[0] && data[0].userId;
if (!(data && data[0]))
return null;
return data[0].userId;
}
exports.useGongoUserId = useGongoUserId;
import { Collection, Database } from "gongo-client";
import type { Document } from "gongo-client/lib/browser/Collection";
import type { SubscriptionArguments, SubscriptionOptions } from "gongo-client/lib/browser/Subscription";
declare function useGongoSub(name: string, args?: SubscriptionArguments, opts?: SubscriptionOptions): "" | import("gongo-client/lib/browser/Subscription").default;
declare function useGongoSub(name: string | null | undefined | false, args?: SubscriptionArguments, opts?: SubscriptionOptions): false | "" | import("gongo-client/lib/browser/Subscription").default | null | undefined;
declare function useGongoIsPopulated(collOrCollNameOrDatabase?: string | Database | Collection<Document>): boolean;

@@ -6,0 +6,0 @@ declare function IsPopulated(...args: unknown[]): void;

{
"name": "gongo-client-react",
"version": "0.2.3",
"version": "0.2.4",
"author": "Gadi Cohen <dragon@wastelands.net>",

@@ -5,0 +5,0 @@ "description": "React hooks for GongoJS gongo-client",

@@ -109,5 +109,6 @@ import { useState, useEffect, useMemo } from "react";

const data = useGongoLive(cursorFunc /*, opts */);
return data[0] && data[0].userId;
if (!(data && data[0])) return null;
return data[0].userId as string;
}
export { useGongoCursor, useGongoLive, useGongoOne, useGongoUserId };

@@ -12,3 +12,3 @@ import { useState, useEffect } from "react";

function useGongoSub(
name: string,
name: string | null | undefined | false,
args?: SubscriptionArguments,

@@ -15,0 +15,0 @@ opts?: SubscriptionOptions

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