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

@contentful/rich-text-plain-text-renderer

Package Overview
Dependencies
Maintainers
43
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/rich-text-plain-text-renderer - npm Package Compare versions

Comparing version 12.0.2 to 12.0.3

13

dist/lib/__test__/index.test.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var rich_text_types_1 = require("@contentful/rich-text-types");
var index_1 = require("../index");
var index_1 = __importDefault(require("../index"));
describe('documentToPlainTextString', function () {

@@ -12,3 +15,3 @@ it('returns empty string when given an empty document', function () {

};
expect(index_1.documentToPlainTextString(document)).toEqual('');
expect(index_1.default.documentToPlainTextString(document)).toEqual('');
});

@@ -46,3 +49,3 @@ it('handles a simple case', function () {

};
expect(index_1.documentToPlainTextString(document)).toEqual('Trout is a seafood delicacy.');
expect(index_1.default.documentToPlainTextString(document)).toEqual('Trout is a seafood delicacy.');
});

@@ -159,3 +162,3 @@ describe('rendering deeply nested documents', function () {

it('handles nested nodes gracefully', function () {
expect(index_1.documentToPlainTextString(document)).toEqual([
expect(index_1.default.documentToPlainTextString(document)).toEqual([
'This is text.',

@@ -169,3 +172,3 @@ 'This is text with some marks.',

it('defers to the user-supplied block divisor', function () {
expect(index_1.documentToPlainTextString(document, '\n\n')).toEqual([
expect(index_1.default.documentToPlainTextString(document, '\n\n')).toEqual([
'This is text. This is text with some marks. This is text from a bolded hyperlink.',

@@ -172,0 +175,0 @@ 'This is a list element in a separate block with a link with marks.',

@@ -102,3 +102,5 @@ "use strict";

}
exports.documentToPlainTextString = documentToPlainTextString;
exports.default = {
documentToPlainTextString: documentToPlainTextString,
};
//# sourceMappingURL=index.js.map
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function unwrapExports (x) {

@@ -632,4 +630,7 @@ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x;

}
var index = {
documentToPlainTextString: documentToPlainTextString,
};
exports.documentToPlainTextString = documentToPlainTextString;
module.exports = index;
//# sourceMappingURL=rich-text-plain-text-renderer.es5.js.map

@@ -8,2 +8,6 @@ import { Block, Inline } from '@contentful/rich-text-types';

*/
export declare function documentToPlainTextString(rootNode: Block | Inline, blockDivisor?: string): string;
declare function documentToPlainTextString(rootNode: Block | Inline, blockDivisor?: string): string;
declare const _default: {
documentToPlainTextString: typeof documentToPlainTextString;
};
export default _default;
{
"name": "@contentful/rich-text-plain-text-renderer",
"version": "12.0.2",
"version": "12.0.3",
"main": "dist/rich-text-plain-text-renderer.es5.js",

@@ -21,4 +21,4 @@ "typings": "dist/types/index.d.ts",

"scripts": {
"build": "tsc --module commonjs && rollup -c rollup.config.js",
"prebuild": "rimraf dist",
"build": "tsc --module commonjs && rollup -c rollup.config.js",
"start": "tsc && rollup -c rollup.config.js -w"

@@ -40,4 +40,3 @@ },

"typescript": "^2.9.2"
},
"gitHead": "0d5e5e3ced730f8393831764d95cc494d76eb5ea"
}
}

@@ -32,3 +32,3 @@ # rich-text-plain-text-renderer

value: 'Hello',
marks: [{ nodeType: 'bold' }]
marks: [{ type: 'bold' }]
},

@@ -38,3 +38,3 @@ {

value: ' world!',
marks: [{ nodeType: 'italic' }]
marks: [{ type: 'italic' }]
},

@@ -41,0 +41,0 @@ ],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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