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.3 to 0.19.4

1

dist/constants.d.ts

@@ -9,2 +9,3 @@ export declare const desktopChunkSize = 1000;

};
export declare const sanitizeRegex: RegExp;
export declare const utterancePropertiesAndEvents: (keyof SpeechSynthesisUtterance)[];

@@ -6,4 +6,5 @@ export const desktopChunkSize = 1000;

export const symbolMapping = { "<": "lessthan", ">": "greaterthan" };
export const sanitizeRegex = new RegExp(`[${Object.keys(symbolMapping).join("")}]|(&[^\s;]+);`, "g");
const utteranceProperties = ["lang", "voice", "volume", "rate", "pitch"];
const utteranceEvents = ["onstart", "onend", "onerror", "onpause", "onresume", "onmark", "onboundary"];
export const utterancePropertiesAndEvents = utteranceProperties.concat(utteranceEvents);

4

dist/utils.js
import { isValidElement } from "react";
import { desktopChunkSize, minChunkSize, mobileChunkSize, specialSymbol, symbolMapping, utterancePropertiesAndEvents } from "./constants.js";
import { desktopChunkSize, minChunkSize, mobileChunkSize, sanitizeRegex, specialSymbol, symbolMapping, utterancePropertiesAndEvents } from "./constants.js";
import { setState } from "./state.js";

@@ -85,2 +85,2 @@ export function ArrayToText(element) {

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

@@ -99,2 +99,2 @@ # react-text-to-speech

Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! Take a look at the [contributing guide](https://github.com/SahilAggarwal2004/react-text-to-speech/blob/master/CONTRIBUTING.md).
Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! Take a look at the [contributing guide](https://github.com/SahilAggarwal2004/react-text-to-speech/blob/master/CONTRIBUTING.md).
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