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
0
Versions
119
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.17.0 to 0.18.0

8

dist/hooks.js

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

utterance.onboundary = (event) => {
setSpeakingWord({ index: findCharIndex(words, offset + event.charIndex), length: event.charLength });
const { charIndex, charLength } = event;
if (charLength && utterance.text[charIndex] === "\u200E") {
setSpeakingWord({ index: findCharIndex(words, offset + charIndex - 1), length: 1 });
offset -= charLength + 1;
}
else
setSpeakingWord({ index: findCharIndex(words, offset + charIndex), length: charLength });
onBoundary === null || onBoundary === void 0 ? void 0 : onBoundary(event);

@@ -87,0 +93,0 @@ };

2

dist/utils.js

@@ -77,2 +77,2 @@ import { isValidElement } from "react";

}
export const sanitize = (text) => text.replace(/[<>]|(&[^\s;]+);/g, (match, group) => (match === "<" ? "(" : (group || "") + ")"));
export const sanitize = (text) => text.replace(/[<>]|(&[^\s;]+);/g, (match, group) => (match === "<" ? " \u200Eless-than " : match === ">" ? " \u200Egreater-than " : group + ")"));
{
"name": "react-text-to-speech",
"version": "0.17.0",
"version": "0.18.0",
"description": "An easy-to-use React.js component that leverages the Web Speech API to convert text to speech.",

@@ -5,0 +5,0 @@ "license": "MIT",

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