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

draftjs-filters

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draftjs-filters - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

18

CHANGELOG.md

@@ -5,6 +5,14 @@ # Change Log

<a name="0.5.0"></a>
# [0.5.0](https://github.com/thibaudcolas/draftjs-filters/compare/v0.4.0...v0.5.0) (2018-01-17)
### Features
* **filters:** add better way to filter/keep based on undefined attr ([f836563](https://github.com/thibaudcolas/draftjs-filters/commit/f836563))
<a name="0.4.0"></a>
# [0.4.0](https://github.com/thibaudcolas/draftjs-filters/compare/v0.3.0...v0.4.0) (2018-01-17)
### Features

@@ -14,4 +22,2 @@

<a name="0.3.0"></a>

@@ -54,2 +60,8 @@

<a name="0.2.2"></a>
# [0.2.2](https://github.com/thibaudcolas/draftjs-filters/compare/v0.1.0...v0.2.2) (2018-01-10)
Identical to 0.1.0.
<a name="0.1.0"></a>

@@ -56,0 +68,0 @@

11

dist/draftjs-filters.cjs.js

@@ -281,6 +281,11 @@ 'use strict';

var isValid = Object.keys(whitelist).every(function (attr) {
var regex = new RegExp(whitelist[attr]);
var hasData = data.hasOwnProperty(attr);
var check = whitelist[attr];
return hasData && regex.test(data[attr]);
if (typeof check === "boolean") {
var hasData = data.hasOwnProperty(attr);
return check ? hasData : !hasData;
}
return new RegExp(check).test(data[attr]);
});

@@ -287,0 +292,0 @@

@@ -277,6 +277,11 @@ import { CharacterMetadata, EditorState } from 'draft-js';

var isValid = Object.keys(whitelist).every(function (attr) {
var regex = new RegExp(whitelist[attr]);
var hasData = data.hasOwnProperty(attr);
var check = whitelist[attr];
return hasData && regex.test(data[attr]);
if (typeof check === "boolean") {
var hasData = data.hasOwnProperty(attr);
return check ? hasData : !hasData;
}
return new RegExp(check).test(data[attr]);
});

@@ -283,0 +288,0 @@

{
"name": "draftjs-filters",
"version": "0.4.0",
"version": "0.5.0",
"description": "Filter Draft.js content to preserve only the formatting you allow",

@@ -5,0 +5,0 @@ "author": "Thibaud Colas",

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