@graffy/core 0.17.8-alpha.2 → 0.17.8-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +3 -3
  2. package/index.mjs +3 -3
  3. package/package.json +4 -4
package/index.cjs CHANGED
@@ -4,7 +4,7 @@ const stream = require("@graffy/stream");
4
4
  const debug = require("debug");
5
5
  const log = debug("graffy:core");
6
6
  function resolve(handlers, firstPayload, firstOptions) {
7
- if (!(handlers == null ? void 0 : handlers.length)) throw Error("resolve.no_provider");
7
+ if (!handlers?.length) throw Error("resolve.no_provider");
8
8
  function run(i, payload, options) {
9
9
  if (i >= handlers.length) {
10
10
  throw Error(`resolve.no_providers_for ${JSON.stringify(payload)}`);
@@ -43,7 +43,7 @@ async function mapStream(stream2, fn) {
43
43
  fn(value);
44
44
  }
45
45
  }
46
- const unchanged = Symbol("Payload or result unchanged by handler");
46
+ const unchanged = /* @__PURE__ */ Symbol("Payload or result unchanged by handler");
47
47
  const decodeCache = /* @__PURE__ */ new WeakMap();
48
48
  function memoizeDecode(origDecode) {
49
49
  return (payload) => {
@@ -94,7 +94,7 @@ function wrapProvider(fn, decodedPath, isRead) {
94
94
  if (!nextCalled && remainingPayload.length) {
95
95
  remainingNextResult = await next(remainingPayload);
96
96
  }
97
- if (remainingNextResult == null ? void 0 : remainingNextResult.length) {
97
+ if (remainingNextResult?.length) {
98
98
  common.merge(result, remainingNextResult);
99
99
  }
100
100
  }
package/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { makeStream, mapStream as mapStream$1 } from "@graffy/stream";
3
3
  import debug from "debug";
4
4
  const log = debug("graffy:core");
5
5
  function resolve(handlers, firstPayload, firstOptions) {
6
- if (!(handlers == null ? void 0 : handlers.length)) throw Error("resolve.no_provider");
6
+ if (!handlers?.length) throw Error("resolve.no_provider");
7
7
  function run(i, payload, options) {
8
8
  if (i >= handlers.length) {
9
9
  throw Error(`resolve.no_providers_for ${JSON.stringify(payload)}`);
@@ -42,7 +42,7 @@ async function mapStream(stream, fn) {
42
42
  fn(value);
43
43
  }
44
44
  }
45
- const unchanged = Symbol("Payload or result unchanged by handler");
45
+ const unchanged = /* @__PURE__ */ Symbol("Payload or result unchanged by handler");
46
46
  const decodeCache = /* @__PURE__ */ new WeakMap();
47
47
  function memoizeDecode(origDecode) {
48
48
  return (payload) => {
@@ -93,7 +93,7 @@ function wrapProvider(fn, decodedPath, isRead) {
93
93
  if (!nextCalled && remainingPayload.length) {
94
94
  remainingNextResult = await next(remainingPayload);
95
95
  }
96
- if (remainingNextResult == null ? void 0 : remainingNextResult.length) {
96
+ if (remainingNextResult?.length) {
97
97
  merge(result, remainingNextResult);
98
98
  }
99
99
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graffy/core",
3
3
  "description": "The main module for Graffy, a library for intuitive real-time data APIs.",
4
4
  "author": "aravind (https://github.com/aravindet)",
5
- "version": "0.17.8-alpha.2",
5
+ "version": "0.17.8-alpha.3",
6
6
  "main": "./index.cjs",
7
7
  "exports": {
8
8
  "import": "./index.mjs",
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "license": "Apache-2.0",
18
18
  "dependencies": {
19
- "@graffy/common": "0.17.8-alpha.2",
20
- "@graffy/stream": "0.17.8-alpha.2",
21
- "debug": "^4.4.1"
19
+ "@graffy/common": "0.17.8-alpha.3",
20
+ "@graffy/stream": "0.17.8-alpha.3",
21
+ "debug": "^4.4.3"
22
22
  }
23
23
  }