Socket
Socket
Sign inDemoInstall

rich-text

Package Overview
Dependencies
25
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

2

lib/delta.js

@@ -150,3 +150,3 @@ var diff = require('fast-diff');

Delta.prototype.concat = function (other) {
var delta = this.slice();
var delta = new Delta(this.ops.slice());
if (other.ops.length > 0) {

@@ -153,0 +153,0 @@ delta.push(other.ops[0]);

{
"name": "rich-text",
"version": "3.0.0",
"version": "3.0.1",
"description": "Format for representing rich text documents and changes.",

@@ -5,0 +5,0 @@ "author": "Jason Chen <jhchen7@gmail.com>",

@@ -27,4 +27,4 @@ # Rich Text [![Build Status](https://travis-ci.org/ottypes/rich-text.svg?branch=master)](http://travis-ci.org/ottypes/rich-text) [![Coverage Status](https://img.shields.io/coveralls/ottypes/rich-text.svg)](https://coveralls.io/r/ottypes/rich-text)

delta.compose(death);
// delta is now:
var restored = delta.compose(death);
// restored is:
// {

@@ -31,0 +31,0 @@ // ops: [

@@ -16,5 +16,7 @@ var Delta = require('../../lib/delta');

var delta = new Delta().insert('Test');
var original = new Delta(JSON.parse(JSON.stringify(delta)));
var concat = new Delta().insert('!', { bold: true });
var expected = new Delta().insert('Test').insert('!', { bold: true });
expect(delta.concat(concat)).to.deep.equal(expected);
expect(delta).to.deep.equal(original);
});

@@ -24,5 +26,7 @@

var delta = new Delta().insert('Test', { bold: true });
var original = new Delta(JSON.parse(JSON.stringify(delta)));
var concat = new Delta().insert('!', { bold: true }).insert('\n');
var expected = new Delta().insert('Test!', { bold: true }).insert('\n');
expect(delta.concat(concat)).to.deep.equal(expected);
expect(delta).to.deep.equal(original);
});

@@ -29,0 +33,0 @@ });

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