1.0.9 • Published 6 years ago

react-xash v1.0.9

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

React-xash

React Utility for adding hash into your text to protect your content.

yarn add react-xash

You see Hello world You copy it H7ezl7l3o5 wwcohrel4dq

Screenshot

Demo - https://gigantz.github.io/react-xash/

Try out - https://codesandbox.io/s/j75ynj9q49

Import it

import Xash from 'react-xash';
const xash = new Xash();

Use it

const anytext = 'Hello world';

return (
    <div>{xash.from(anytext)}</div>
);

Options

const xash = new Xash({
    elementTypes: ['a','td', ...] // elements to use in xashing
    robots: '(googlebot|scraper| ....)' // return plain text if bot indexing it
    userAgent: req.headers['user-agent'] // if you use server side rendering set it
});
1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago