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
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.19.1 to 0.19.2

2

dist/constants.d.ts
export declare const desktopChunkSize = 1000;
export declare const minChunkSize = 50;
export declare const mobileChunkSize = 250;
export declare const specialSymbol = "\u200E";
export declare const specialSymbol = "\u00A0";
export declare const symbolMapping: {

@@ -6,0 +6,0 @@ "<": string;

export const desktopChunkSize = 1000;
export const minChunkSize = 50;
export const mobileChunkSize = 250;
export const specialSymbol = "\u200E";
export const specialSymbol = "\u00A0";
export const symbolMapping = { "<": "lessthan", ">": "greaterthan" };

@@ -6,0 +6,0 @@ const utteranceProperties = ["lang", "voice", "volume", "rate", "pitch"];

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

setSpeakingWord(null);
else if (utterance.text[charIndex] === specialSymbol) {
else if (utterance.text[charIndex + charLength] === specialSymbol) {
setSpeakingWord({ index: findCharIndex(words, offset + charIndex - 1), length: 1 });

@@ -98,0 +98,0 @@ offset -= charLength + 1;

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

}
export const sanitize = (text) => text.replace(/[<>]|(&[^\s;]+);/g, (match, group) => (group ? group + ")" : ` ${specialSymbol}${symbolMapping[match]} `));
export const sanitize = (text) => text.replace(/[<>]|(&[^\s;]+);/g, (match, group) => (group ? group + ")" : ` ${symbolMapping[match]}${specialSymbol}`));
{
"name": "react-text-to-speech",
"version": "0.19.1",
"version": "0.19.2",
"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