react-obfuscate
Advanced tools
Comparing version 3.6.2 to 3.6.4
@@ -10,6 +10,14 @@ "use strict"; | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -159,3 +167,3 @@ | ||
onContextMenu: this.handleCopiability.bind(this) | ||
}, others, clickProps, { | ||
}, others, {}, clickProps, { | ||
style: obsStyle | ||
@@ -171,2 +179,17 @@ }); | ||
exports["default"] = Obfuscate; | ||
exports["default"] = Obfuscate; | ||
Obfuscate.propTypes = { | ||
facetime: _propTypes["default"].string, | ||
linkText: _propTypes["default"].string, | ||
element: _propTypes["default"].string, | ||
email: _propTypes["default"].string, | ||
href: _propTypes["default"].string, | ||
tel: _propTypes["default"].string, | ||
sms: _propTypes["default"].string, | ||
children: _propTypes["default"].object, | ||
headers: _propTypes["default"].object, | ||
style: _propTypes["default"].object, | ||
onClick: _propTypes["default"].func, | ||
obfuscate: _propTypes["default"].bool, | ||
obfuscateChildren: _propTypes["default"].bool | ||
}; |
{ | ||
"name": "react-obfuscate", | ||
"version": "3.6.2", | ||
"version": "3.6.4", | ||
"description": "An intelligent React component to obfuscate any contact link", | ||
@@ -20,3 +20,3 @@ "main": "dist/obfuscate.js", | ||
"engines": { | ||
"node": ">= 0.10.0" | ||
"node": ">= 10.0.0" | ||
}, | ||
@@ -28,4 +28,6 @@ "scripts": { | ||
"clean": "rm -rf dist && mkdir dist", | ||
"export": "npm run build-site && next export", | ||
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write \"src/**/*.js\"", | ||
"export": "yarn build-site && next export", | ||
"format": "prettier --write src/**/*.{js,jsx}", | ||
"lint": "eslint --ext=js --ext=jsx ./src", | ||
"lint:fix": "eslint --ext=js --ext=jsx ./src --fix ", | ||
"test": "jest", | ||
@@ -35,24 +37,37 @@ "test:watch": "jest --watch", | ||
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls", | ||
"preversion": "npm run test && npm run format && npm run clean && npm run build && npm run export", | ||
"postpublish": "git push && git push --tag" | ||
"preversion": "yarn format && yarn lint && yarn test && yarn build && yarn export", | ||
"postpublish": "git push && git push --tag", | ||
"release": "standard-version" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.2.3", | ||
"@babel/core": "^7.4.0", | ||
"@babel/plugin-transform-spread": "^7.2.2", | ||
"@babel/preset-env": "^7.4.2", | ||
"@babel/preset-react": "^7.0.0", | ||
"babel-jest": "^24.5.0", | ||
"coveralls": "^3.0.3", | ||
"enzyme": "^3.9.0", | ||
"enzyme-adapter-react-16": "^1.11.2", | ||
"enzyme-to-json": "^3.3.5", | ||
"jest": "^24.4.0", | ||
"next": "^8.1.0", | ||
"prettier": "^1.16.4", | ||
"react": "^16.8.5", | ||
"react-dom": "^16.8.5", | ||
"react-live": "^2.0.0", | ||
"react-test-renderer": "^16.8.5", | ||
"react-window-ui": "^2.1.0" | ||
"@babel/cli": "7.8.3", | ||
"@babel/core": "7.8.0", | ||
"@babel/plugin-transform-spread": "7.8.3", | ||
"@babel/preset-env": "7.8.2", | ||
"@babel/preset-react": "7.8.0", | ||
"@commitlint/cli": "8.3.5", | ||
"@commitlint/config-conventional": "8.3.4", | ||
"@typescript-eslint/parser": "2.16.0", | ||
"babel-eslint": "10.0.3", | ||
"babel-jest": "24.9.0", | ||
"coveralls": "3.0.6", | ||
"enzyme": "3.10.0", | ||
"enzyme-adapter-react-16": "1.14.0", | ||
"enzyme-to-json": "3.4.0", | ||
"eslint": "6.8.0", | ||
"eslint-config-prettier": "6.9.0", | ||
"eslint-plugin-prettier": "3.1.2", | ||
"eslint-plugin-react": "7.18.0", | ||
"eslint-plugin-react-hooks": "2.3.0", | ||
"husky": "4.0.10", | ||
"jest": "24.9.0", | ||
"lint-staged": "9.5.0", | ||
"next": "9.1.5", | ||
"prettier": "1.18.2", | ||
"react": "16.9.0", | ||
"react-dom": "16.9.0", | ||
"react-live": "2.2.0", | ||
"react-test-renderer": "16.9.0", | ||
"react-window-ui": "2.1.0", | ||
"standard-version": "7.0.1" | ||
}, | ||
@@ -68,6 +83,35 @@ "jest": { | ||
"moduleNameMapper": { | ||
"^.+\\.(css|scss)$": "identity-obj-proxy" | ||
".+\\.(css|scss)$": "identity-obj-proxy" | ||
} | ||
}, | ||
"dependencies": {} | ||
"eslintConfig": { | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "babel-eslint", | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
}, | ||
"dependencies": {}, | ||
"lint-staged": { | ||
"*.{js,jsx}": [ | ||
"eslint --fix", | ||
"git add" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS", | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
} | ||
} |
@@ -33,4 +33,4 @@ # react-obfuscate | ||
```js | ||
import React from "react"; | ||
import Obfuscate from "react-obfuscate"; | ||
import React from 'react' | ||
import Obfuscate from 'react-obfuscate' | ||
@@ -41,14 +41,14 @@ 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!', | ||
}} | ||
/> | ||
</p> | ||
); | ||
) | ||
``` | ||
@@ -118,5 +118,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 +132,3 @@ ``` | ||
```js | ||
<Obfuscate element="p" style={{ textAlign: "left" }}> | ||
<Obfuscate element="p" style={{ textAlign: 'left' }}> | ||
This paragraph is more secret than others. | ||
@@ -135,0 +135,0 @@ </Obfuscate> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20609
5
159
30