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

react-text-to-speech

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-text-to-speech - npm Package Compare versions

Comparing version 0.13.1 to 0.13.2

9

dist/hooks.js

@@ -59,3 +59,3 @@ import React, { cloneElement, isValidElement, useEffect, useMemo, useRef, useState } from "react";

utterance.onboundary = null;
removeFromQueue(null, onQueueChange);
removeFromQueue(utteranceRef.current, onQueueChange);
speakFromQueue();

@@ -89,9 +89,8 @@ onStop === null || onStop === void 0 ? void 0 : onStop(event);

if (preserveUtteranceQueue && speechStatus !== "started")
setSpeechStatus("queued");
return setSpeechStatus("queued");
else
cancel();
if (preserveUtteranceQueue)
return;
}
speakFromQueue();
else
speakFromQueue();
setSpeechStatus("started");

@@ -98,0 +97,0 @@ }

export type SpeechUtterancesQueue = SpeechSynthesisUtterance[];
export type QueueChangeEventHandler = (queue: SpeechUtterancesQueue) => any;
export declare function addToQueue(utterance: SpeechSynthesisUtterance, callback?: QueueChangeEventHandler): void;
export declare function removeFromQueue(utterance?: SpeechSynthesisUtterance | null, callback?: QueueChangeEventHandler): void;
export declare function removeFromQueue(utterance: SpeechSynthesisUtterance, callback?: QueueChangeEventHandler): void;
export declare function clearQueue(): void;
export declare function speakFromQueue(): void;

@@ -7,6 +7,6 @@ let queue = [];

export function removeFromQueue(utterance, callback) {
if (!utterance)
queue.shift();
else
queue = queue.filter((queuedUtterance) => queuedUtterance !== utterance);
const index = queue.indexOf(utterance);
if (index === -1)
return;
queue.splice(index, 1);
callback === null || callback === void 0 ? void 0 : callback(queue);

@@ -13,0 +13,0 @@ }

{
"name": "react-text-to-speech",
"version": "0.13.1",
"version": "0.13.2",
"description": "An easy to use react component for the Web Speech API.",

@@ -5,0 +5,0 @@ "type": "module",

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