prosemirror-model
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "prosemirror-model", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "ProseMirror's document model", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import {Fragment} from "./fragment" | ||
// ::- Error type raised by [`Node.replace`](#model.Node.replace) when | ||
// ReplaceError:: class extends Error | ||
// Error type raised by [`Node.replace`](#model.Node.replace) when | ||
// given an invalid replacement. | ||
export class ReplaceError extends Error { | ||
constructor(message) { | ||
super(message) | ||
this.message = message | ||
} | ||
get name() { return "ReplaceError" } | ||
export function ReplaceError(message) { | ||
let err = Error.call(this, message) | ||
err.__proto__ = ReplaceError.prototype | ||
return err | ||
} | ||
ReplaceError.prototype = Object.create(Error.prototype) | ||
ReplaceError.prototype.constructor = ReplaceError | ||
ReplaceError.prototype.name = "ReplaceError" | ||
// ::- A slice represents a piece cut out of a larger document. It | ||
@@ -21,4 +25,3 @@ // stores not only a fragment, but also the depth up to which nodes on | ||
// appropriate side of the fragment—i.e. if the fragment is an empty | ||
// paragraph node, `openStart` and `openEnd` can't be greater than | ||
// 1. | ||
// paragraph node, `openStart` and `openEnd` can't be greater than 1. | ||
// | ||
@@ -25,0 +28,0 @@ // It is not necessary for the content of open nodes to conform to |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
459556
5780