Socket
Socket
Sign inDemoInstall

clean-tag

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-tag - npm Package Compare versions

Comparing version 2.0.3 to 3.0.0

12

dist.js

@@ -32,3 +32,3 @@ 'use strict';

var blacklist = [].concat(_toConsumableArray(Object.keys(allPropTypes)), ['theme']);
var omitProps = [].concat(_toConsumableArray(Object.keys(allPropTypes)), ['theme']);

@@ -47,9 +47,9 @@ var omit = exports.omit = function omit(obj, keys) {

Tag = _ref$is === undefined ? 'div' : _ref$is,
_ref$blacklist = _ref.blacklist,
blacklist = _ref$blacklist === undefined ? [] : _ref$blacklist,
props = _objectWithoutProperties(_ref, ['is', 'blacklist']);
_ref$omitProps = _ref.omitProps,
omitProps = _ref$omitProps === undefined ? [] : _ref$omitProps,
props = _objectWithoutProperties(_ref, ['is', 'omitProps']);
return _react2.default.createElement(Tag, _extends({
ref: ref
}, omit(props, blacklist)));
}, omit(props, omitProps)));
});

@@ -61,3 +61,3 @@

Tag.defaultProps = {
blacklist: blacklist
omitProps: omitProps
};

@@ -64,0 +64,0 @@

@@ -9,3 +9,3 @@ import React from 'react'

const blacklist = [ ...Object.keys(allPropTypes), 'theme' ]
const omitProps = [ ...Object.keys(allPropTypes), 'theme' ]

@@ -23,7 +23,7 @@ export const omit = (obj, keys) => {

is: Tag = 'div',
blacklist = [],
omitProps = [],
...props
}, ref) => React.createElement(Tag, {
ref,
...omit(props, blacklist)
...omit(props, omitProps)
}))

@@ -34,3 +34,3 @@

Tag.defaultProps = {
blacklist
omitProps: omitProps
}

@@ -37,0 +37,0 @@

{
"name": "clean-tag",
"version": "2.0.3",
"version": "3.0.0",
"description": "",

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

@@ -48,11 +48,11 @@

## `blacklist` prop
## `omitProps` prop
Provide a custom blacklist of prop names.
Provide a custom list of prop keys to remove from the backing styled component.
The default blacklist is based on Styled System's propType definitions.
The default list is based on Styled System's propType definitions.
```js
<Heading
blacklist={[
omitProps={[
'fontSize',

@@ -59,0 +59,0 @@ 'color'

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