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.14.2 to 0.14.3

2

dist/hooks.js

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

return;
const utterance = new SpeechSynthesisUtterance(sanitize(ArrayToText(words)));
const utterance = new SpeechSynthesisUtterance(sanitize(ArrayToText(words), highlightText));
utterance.pitch = pitch;

@@ -28,0 +28,0 @@ utterance.rate = rate;

@@ -53,2 +53,3 @@ import { DetailedHTMLProps, HTMLAttributes, ReactNode } from "react";

export type Index = string | number;
export type Replacer = (match: string) => string;
export type StringArray = string | StringArray[];

@@ -9,2 +9,2 @@ import { ReactNode } from "react";

export declare function isParent(parentIndex: string, index?: string): boolean;
export declare const sanitize: (text: string) => string;
export declare function sanitize(text: string, strict: boolean): string;

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

}
export const sanitize = (text) => text.replace(/<([^>]+)>|;/g, (_, group) => (group ? `(${group})` : "("));
export function sanitize(text, strict) {
if (strict)
var replacer = (match) => (match === "<" ? "(" : ")");
else
replacer = (match) => (match === "<" ? "less than" : match === ">" ? "greater than" : ")");
return text.replace(/[<>;]/g, replacer);
}
{
"name": "react-text-to-speech",
"version": "0.14.2",
"version": "0.14.3",
"description": "An easy to use react component for the Web Speech API.",

@@ -25,2 +25,4 @@ "type": "module",

"tts-react",
"speak",
"say",
"highlight",

@@ -27,0 +29,0 @@ "queue",

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