@slate-serializers/utilities
Advanced tools
Comparing version 1.0.2 to 2.0.0
{ | ||
"name": "@slate-serializers/utilities", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -19,2 +19,3 @@ export declare const hasLineBreak: (str: string) => boolean; | ||
export declare const encodeBreakingEntities: (str: string) => string; | ||
export declare const decodeBreakingEntities: (str: string) => string; | ||
export declare const intersection: (o1: { | ||
@@ -21,0 +22,0 @@ [key: string]: any; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.styleMapToAttribs = exports.intersection = exports.encodeBreakingEntities = exports.getNested = exports.removeEmpty = exports.isEmptyObject = exports.styleToString = exports.parseStyleCssText = exports.prependSpace = exports.hasLineBreak = void 0; | ||
exports.styleMapToAttribs = exports.intersection = exports.decodeBreakingEntities = exports.encodeBreakingEntities = exports.getNested = exports.removeEmpty = exports.isEmptyObject = exports.styleToString = exports.parseStyleCssText = exports.prependSpace = exports.hasLineBreak = void 0; | ||
const hasLineBreak = (str) => str.match(/[\r\n]+/) !== null; | ||
@@ -78,2 +78,6 @@ exports.hasLineBreak = hasLineBreak; | ||
exports.encodeBreakingEntities = encodeBreakingEntities; | ||
const decodeBreakingEntities = (str) => { | ||
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>'); | ||
}; | ||
exports.decodeBreakingEntities = decodeBreakingEntities; | ||
const intersection = (o1, o2) => { | ||
@@ -80,0 +84,0 @@ return Object.keys(o1) |
Sorry, the diff of this file is not supported yet
14194
246