string-replace-jsx
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

String-Replace-Jsx

npm GitHub stars GitHub license Node.js CI

What

The stringReplaceJsx method returns a new string with some or all matches of a pattern.

How to use

npm i --save string-replace-jsx

import stringReplaceJsx from "string-replace-jsx";

<div>
  {stringReplaceJsx("fuga https://google.com", urlRegex, (match) => (
    <a
      className={styles.link}
      href={match.toString()}
      target="_blank"
      rel="noreferrer"
    >
      {match}
    </a>
  ))}
</div>;

Readme

Keywords

Package Sidebar

Install

npm i string-replace-jsx

Weekly Downloads

5

Version

0.0.2

License

MIT

Unpacked Size

5.65 kB

Total Files

6

Last publish

Collaborators

  • nozomoto