Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-obfuscate

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-obfuscate - npm Package Compare versions

Comparing version 1.3.3 to 1.4.0

5

dist/obfuscate.js

@@ -105,3 +105,4 @@ 'use strict';

style = _props2.style,
others = _objectWithoutProperties(_props2, ['tel', 'sms', 'facetime', 'email', 'obfuscate', 'headers', 'children', 'style']);
href = _props2.href,
others = _objectWithoutProperties(_props2, ['tel', 'sms', 'facetime', 'email', 'obfuscate', 'headers', 'children', 'style', 'href']);

@@ -120,3 +121,3 @@ var obsStyle = _extends({}, style || {}, {

onClick: this.handleClick.bind(this),
href: 'obfuscated'
href: href || 'obfuscated'
}, others, {

@@ -123,0 +124,0 @@ style: obsStyle

2

package.json
{
"name": "react-obfuscate",
"version": "1.3.3",
"version": "1.4.0",
"description": "An intelligent React component to obfuscate any contact link",

@@ -5,0 +5,0 @@ "main": "dist/obfuscate.js",

@@ -9,6 +9,4 @@ # react-obfuscate

![react-obfuscate](https://user-images.githubusercontent.com/7424180/28096225-c2f07142-666c-11e7-96ab-c12f34d1b86f.png)
## Demo & Examples

@@ -18,10 +16,12 @@

## How it works
The user passes the contact link as an ```email, tel, sms, or facetime``` prop. The component obfuscates href data until an onClick event. Links are given their proper URL schemes (mailto, facetime, etc.) The link is rendered in reverse in the dom, but reversed again with css. This making the link useless for spammers, but user friendly on screen.
The user passes the contact link as an `email, tel, sms, or facetime` prop. The component obfuscates href data until an onClick event. Links are given their proper URL schemes (mailto, facetime, etc.) The link is rendered in reverse in the dom, but reversed again with css. This making the link useless for spammers, but user friendly on screen.
## Why
The world needs obfuscated links that display the link in a friendly way.
## Installation
```bash

@@ -32,2 +32,3 @@ npm install --save react-obfuscate

### Input
```js

@@ -39,8 +40,12 @@ import React from 'react'

<p>
Phone: <Obfuscate tel='205-454-1234' /><br />
Email: <Obfuscate
email='hello@coston.cool'
headers={
{subject:'Question from the website', cc:'friend@coston.cool'}
}/>
Phone: <Obfuscate tel="205-454-1234" />
<br />
Email:{' '}
<Obfuscate
email="hello@coston.cool"
headers={{
subject: 'Question from the website',
cc: 'friend@coston.cool',
}}
/>
</p>

@@ -51,3 +56,5 @@ )

### Output
#### Robot Interaction
```html

@@ -61,2 +68,3 @@ <p>

#### Human Interaction
```js

@@ -71,12 +79,12 @@ <p>

Prop | Type | Argument | Default | Description
----------|-----------|--------------|-----------|------------
email | `string` | `<optional>` | `null` | email address of the intended recipient
tel | `string` | `<optional>` | `null` | telephone number of the intended recipient
sms | `string` | `<optional>` | `null` | sms number of the intended recipient
facetime | `string` | `<optional>` | `null` | facetime address of the intended recipient
headers | `object` | `<optional>` | `null` | subject, cc, bcc, body, etc
obfuscate | `boolean` | `<optional>` | `true` | set to false to disable obfuscation
| Prop | Type | Argument | Default | Description |
| --------- | --------- | ------------ | ------- | --------------------------------------------------- |
| email | `string` | `<optional>` | `null` | email address of the intended recipient |
| tel | `string` | `<optional>` | `null` | telephone number of the intended recipient |
| sms | `string` | `<optional>` | `null` | sms number of the intended recipient |
| facetime | `string` | `<optional>` | `null` | facetime address of the intended recipient |
| headers | `object` | `<optional>` | `null` | subject, cc, bcc, body, etc |
| obfuscate | `boolean` | `<optional>` | `true` | set to false to disable obfuscation |
| href | `string` | `<optional>` | `null` | add custom obfuscated href message, like 'Email Me' |
## Development

@@ -89,15 +97,21 @@

## Contributors
react-obfuscate is awesome thanks to these community members:
- [coston](https://github.com/coston)
- [bostrom](https://github.com/bostrom)
- [timmygee](https://github.com/timmygee)
* [coston](https://github.com/coston)
* [bostrom](https://github.com/bostrom)
* [timmygee](https://github.com/timmygee)
* [mic](https://github.com/mic)
## Contributing
Please help make this react component better. Submit any issue and/or make a pull request!
### To Do
- Write some good tests
- Convert clipboard text left to right
* Write some good tests
* Convert clipboard text left to right
## License
Licensed under the MIT license.

@@ -72,2 +72,3 @@ import React, { Component } from 'react'

style,
href,
...others

@@ -88,3 +89,3 @@ } = this.props

onClick={this.handleClick.bind(this)}
href="obfuscated"
href={href || 'obfuscated'}
{...others}

@@ -91,0 +92,0 @@ style={obsStyle}

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