react-streaming
Advanced tools
Comparing version 0.1.2 to 0.1.3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createBuffer = void 0; | ||
const vitest_1 = require("vitest"); | ||
const utils_1 = require("../utils"); | ||
@@ -26,3 +25,3 @@ function createBuffer(bufferParams) { | ||
if (state !== 'STREAMING') { | ||
(0, vitest_1.assert)(state === 'UNSTARTED'); | ||
(0, utils_1.assert)(state === 'UNSTARTED'); | ||
return; | ||
@@ -32,3 +31,3 @@ } | ||
const { writeChunk } = bufferParams; | ||
(0, vitest_1.assert)(writeChunk); | ||
(0, utils_1.assert)(writeChunk); | ||
writeChunk(chunk); | ||
@@ -60,3 +59,3 @@ }); | ||
flushBuffer(); | ||
(0, vitest_1.assert)(buffer.length === 0); | ||
(0, utils_1.assert)(buffer.length === 0); | ||
state = 'ENDED'; | ||
@@ -63,0 +62,0 @@ DEBUG && console.log('>>> END'); |
export { createBuffer }; | ||
import { assert } from 'vitest'; | ||
import { assertUsage } from '../utils'; | ||
import { assert, assertUsage } from '../utils'; | ||
function createBuffer(bufferParams) { | ||
@@ -5,0 +4,0 @@ const buffer = []; |
{ | ||
"name": "react-streaming", | ||
"description": "React 18 Streaming. Made fully-fledged & easy.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "./dist/cjs/index.js", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49850
1050