
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
react-text-source
Advanced tools
A package that makes replace jsx components content easier.
require('react-text-replace')
npm install --save react-text-source
require('react-text-replace')
yarn add react-text-replace
import React from "react"
import { textReplace } from "react-text-replace"
import uuidv1 from "uuid/v1"
const App = props =>
textReplace({
source: ">> Hello >> world >> !!",
find: />>(.*)/,
call(match, $1) {
return <h1 key={uuidv1()}>{$1}</h1>
}
})
<h1> Hello >> world >> !!</h1>
import React from "react"
import { textReplace } from "react-text-replace"
import uuidv1 from "uuid/v1"
const source = ">> Hello >> world >> !!"
const options = [
{
find: />>(.*)/,
call(match, $1) {
return (
<span style={{ fontSize: "2em" }} key={uuidv1()}>
{$1}
</span>
)
}
},
{
find: /!!/,
call(match) {
return <i key={uuidv1()}>{match}</i>
}
}
]
var App = props =>
textReplace(source, options) || textReplace(source, ...options)
<span style="font-size: 2em">
Hello >> world >> <i>!!</i>
</span>
import React from "react"
import { TextReplace } from "react-text-replace"
import uuidv1 from "uuid/v1"
// Creates a cache that lasts until close the page
const App = props => (
<TextReplace
source={">> Hello >> world >> !!"}
pipe={[
{
find: />>(.*)/,
call(match, $1) {
return (
<span style={{ fontSize: "2em" }} key={uuidv1()}>
{$1}
</span>
)
},
isRecursive: true
},
{
find: /!!/,
call(match) {
return <i key={uuidv1()}>{match}</i>
}
}
]}
/>
)
<span style="font-size: 2em"> Hello
<span style="font-size: 2em"> world
<span style="font-size: 2em">
<i>!!</i>
</span>
</span>
</span>
Licensed under permissive MIT license
FAQs
A package that makes replace jsx components content easier.
We found that react-text-source demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.