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

prosemirror-state

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-state - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

8

dist/index.js

@@ -926,6 +926,8 @@ 'use strict';

// :: (?Object<Plugin>) → Object
// :: (?union<Object<Plugin>, string, number>) → Object
// Serialize this state to JSON. If you want to serialize the state
// of plugins, pass an object mapping property names to use in the
// resulting JSON object to plugin objects.
// resulting JSON object to plugin objects. The argument may also be
// a string or number, in which case it is ignored, to support the
// way `JSON.stringify` calls `toString` methods.
EditorState.prototype.toJSON = function toJSON (pluginFields) {

@@ -935,3 +937,3 @@ var this$1 = this;

var result = {doc: this.doc.toJSON(), selection: this.selection.toJSON()};
if (pluginFields) { for (var prop in pluginFields) {
if (pluginFields && typeof pluginFields == 'object') { for (var prop in pluginFields) {
if (prop == "doc" || prop == "selection")

@@ -938,0 +940,0 @@ { throw new RangeError("The JSON fields `doc` and `selection` are reserved") }

{
"name": "prosemirror-state",
"version": "1.0.2",
"version": "1.1.0",
"description": "ProseMirror editor state",

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

@@ -213,9 +213,11 @@ import {Node} from "prosemirror-model"

// :: (?Object<Plugin>) → Object
// :: (?union<Object<Plugin>, string, number>) → Object
// Serialize this state to JSON. If you want to serialize the state
// of plugins, pass an object mapping property names to use in the
// resulting JSON object to plugin objects.
// resulting JSON object to plugin objects. The argument may also be
// a string or number, in which case it is ignored, to support the
// way `JSON.stringify` calls `toString` methods.
toJSON(pluginFields) {
let result = {doc: this.doc.toJSON(), selection: this.selection.toJSON()}
if (pluginFields) for (let prop in pluginFields) {
if (pluginFields && typeof pluginFields == 'object') for (let prop in pluginFields) {
if (prop == "doc" || prop == "selection")

@@ -222,0 +224,0 @@ throw new RangeError("The JSON fields `doc` and `selection` are reserved")

Sorry, the diff of this file is not supported yet

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