Socket
Socket
Sign inDemoInstall

draft-js-single-line-plugin

Package Overview
Dependencies
23
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0

4

CHANGELOG.md

@@ -6,4 +6,8 @@ # Change Log

# v2.0.0 2017-03-20
* Update the handleReturn to conform to the 2.0.X breaking API change — [thanks to @AnilRedshift!](https://github.com/icelab/draft-js-single-line-plugin/pull/2)
# v1.0.0 2017-02-23
* Releasing as v1.0.0 for better semver compatibility.

6

lib/index.js

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

function singleLinePlugin() {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

@@ -105,6 +105,6 @@ options = Object.assign({}, defaultOptions, options);

* @param {KeyboardEvent} e Synthetic keyboard event from draftjs
* @return {Boolean} Did we handle the return or not? (pro-trip: yes, we did)
* @return {String} Did we handle the return or not? (pro-trip: yes, we did)
*/
handleReturn: function handleReturn(e) {
return true;
return "handled";
}

@@ -111,0 +111,0 @@ };

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

function replaceNewlines(str) {
var replacement = arguments.length <= 1 || arguments[1] === undefined ? ' ' : arguments[1];
var replacement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';

@@ -32,0 +32,0 @@ return str.replace(NEWLINE_REGEX, replacement);

{
"name": "draft-js-single-line-plugin",
"version": "1.0.0",
"version": "2.0.0",
"description": "Restrict a draft-js editor to a single line of input.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc