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

react-obfuscate

Package Overview
Dependencies
Maintainers
0
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 3.7.0-0 to 3.7.0

lib/cjs/index.d.ts

91

package.json
{
"name": "react-obfuscate",
"version": "3.7.0-0",
"version": "3.7.0",
"description": "An intelligent React component to obfuscate any contact link",
"main": "dist/obfuscate.js",
"files": [
"dist/obfuscate.js"
"/lib"
],
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/esm/index.d.ts",
"author": "Coston Perkins <costonperkins@me.com> (https://coston.io)",

@@ -24,61 +26,44 @@ "homepage": "https://github.com/coston/react-obfuscate",

"start": "next",
"build": "babel -d dist src",
"build": "npm run build:esm && npm run build:cjs",
"build:cjs": "tsc --module commonjs --outDir lib/cjs",
"build:esm": "tsc",
"build-site": "next build",
"clean": "rm -rf dist && mkdir dist",
"export": "yarn build-site && next export",
"export": "npm run build-site && next export",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"lint": "eslint --ext=js --ext=jsx ./src",
"lint:fix": "eslint --ext=js --ext=jsx ./src --fix",
"lint": "eslint '**/*.{js,ts,tsx}'",
"lint:fix": "eslint '**/*.{js,ts,tsx}' --fix",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"preversion": "yarn test && yarn lint:fix && yarn clean && yarn build && yarn export",
"preversion": "npm run test && npm run lint:fix && npm run clean && npm run build && npm run export",
"postpublish": "git push && git push --tag"
},
"devDependencies": {
"@babel/cli": "7.8.4",
"@babel/core": "7.8.7",
"@babel/plugin-transform-spread": "7.8.3",
"@babel/preset-env": "7.8.7",
"@babel/preset-react": "7.8.3",
"@commitlint/cli": "8.3.5",
"@commitlint/config-conventional": "8.3.4",
"babel-eslint": "10.1.0",
"babel-jest": "25.2.4",
"coveralls": "3.0.11",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.2",
"enzyme-to-json": "3.4.4",
"eslint": "6.8.0",
"eslint-config-airbnb": "18.1.0",
"eslint-config-prettier": "6.10.1",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "3.0.0",
"husky": "4.2.3",
"jest": "25.2.4",
"lint-staged": "10.1.1",
"next": "9.3.2",
"prettier": "2.0.2",
"prop-types": "15.7.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-live": "2.2.2",
"react-test-renderer": "16.13.1",
"react-window-ui": "2.1.0"
"@commitlint/cli": "19.2.1",
"@commitlint/config-conventional": "19.1.0",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/react": "^15.0.2",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"coveralls": "3.1.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.34.1",
"husky": "9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "15.2.2",
"next": "13.4.7",
"prettier": "3.2.5",
"prop-types": "15.8.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-live": "4.1.6",
"react-window-ui": "2.2.0",
"ts-jest": "^29.1.2",
"typescript": "^5.4.5"
},
"jest": {
"setupFiles": [
"./test/jestsetup.js"
],
"collectCoverage": true,
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"moduleNameMapper": {
"^.+\\.(css|scss)$": "identity-obj-proxy"
}
},
"peerDependencies": {

@@ -90,3 +75,3 @@ "prop-types": ">= 15",

"lint-staged": {
"*.{js,jsx}": [
"*.{js,jsx,ts,tsx}": [
"eslint --fix"

@@ -93,0 +78,0 @@ ]

# react-obfuscate
[![Coverage Status](https://coveralls.io/repos/github/coston/react-obfuscate/badge.svg?branch=master)](https://coveralls.io/github/coston/react-obfuscate?branch=master)
[![Build Status](https://travis-ci.org/coston/react-obfuscate.svg?branch=master)](https://travis-ci.org/coston/react-obfuscate)
[![Greenkeeper badge](https://badges.greenkeeper.io/coston/react-obfuscate.svg)](https://greenkeeper.io/)
![GitHub last commit](https://img.shields.io/github/last-commit/coston/react-obfuscate)
[![npm version](https://badge.fury.io/js/react-obfuscate.svg)](https://www.npmjs.com/package/react-obfuscate)
[![npm](https://img.shields.io/npm/dm/react-obfuscate.svg)](https://www.npmjs.com/package/react-obfuscate)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
![react-obfuscate](https://user-images.githubusercontent.com/7424180/28096225-c2f07142-666c-11e7-96ab-c12f34d1b86f.png)

@@ -33,4 +31,4 @@

```js
import React from "react";
import Obfuscate from "react-obfuscate";
import React from 'react';
import Obfuscate from 'react-obfuscate';

@@ -41,10 +39,10 @@ export default () => (

<br />
Email:{" "}
Email:{' '}
<Obfuscate
email="hello@coston.io"
headers={{
cc: "dade@zero-cool.af",
bcc: "smith@machina.net",
subject: "react-obfuscate",
body: "Down with the machines!"
cc: 'dade@zero-cool.af',
bcc: 'smith@machina.net',
subject: 'react-obfuscate',
body: 'Down with the machines!',
}}

@@ -118,5 +116,5 @@ />

<address>
<Obfuscate style={{ display: "inline-block" }} email="-mail@mailbox.org" />
<Obfuscate style={{ display: 'inline-block' }} email="-mail@mailbox.org" />
<br />
<Obfuscate style={{ display: "inline-block" }} tel="+69 111 222 333" />
<Obfuscate style={{ display: 'inline-block' }} tel="+69 111 222 333" />
</address>

@@ -132,3 +130,3 @@ ```

```js
<Obfuscate element="p" style={{ textAlign: "left" }}>
<Obfuscate element="p" style={{ textAlign: 'left' }}>
This paragraph is more secret than others.

@@ -138,2 +136,19 @@ </Obfuscate>

## Children
By default, objects **are not** reversed in the dom, but other types are. The `obfuscateChildren` prop set will disabled this functionality when set to `false`. If the child is an object, like html elements are, it will be rendered normally.
##### Example Use Case
```js
<Obfuscate email="hello@coston.io" aria-label="Email Me">
<svg width={24} height={21}>
<path
fill="#000"
d="M12 12.713L.0 3h23.97L12 12.713zm0 2.574L0 5.562V21h24V5"
/>
</svg>
</Obfuscate>
```
## Contributors

@@ -149,2 +164,3 @@

- [charlesbdudley](https://github.com/charlesbdudley)
- [dalbitresb12](https://github.com/dalbitresb12)

@@ -151,0 +167,0 @@ ## Contributing

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