New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@chayns-components/format

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chayns-components/format - npm Package Compare versions

Comparing version 5.0.0-beta.674 to 5.0.0-beta.682

lib/cjs/constants/format.js

7

lib/cjs/index.js

@@ -6,2 +6,8 @@ "use strict";

});
Object.defineProperty(exports, "BB_CODE_HTML_TAG_PREFIX", {
enumerable: true,
get: function () {
return _format.BB_CODE_HTML_TAG_PREFIX;
}
});
Object.defineProperty(exports, "formatStringToHtml", {

@@ -13,3 +19,4 @@ enumerable: true,

});
var _format = require("./constants/format");
var _formatString = require("./utils/formatString/formatString");
//# sourceMappingURL=index.js.map

4

lib/cjs/utils/escape.js

@@ -6,7 +6,5 @@ "use strict";

});
exports.escapeHtmlInText = exports.MESSAGE_CONVERSION_LINE_BREAK_ESCAPED = exports.MESSAGE_CONVERSION_LINE_BREAK = void 0;
exports.escapeHtmlInText = void 0;
const escapeHtmlInText = text => text.replace(/</g, '&lt;').replace(/>/g, '&gt;');
exports.escapeHtmlInText = escapeHtmlInText;
const MESSAGE_CONVERSION_LINE_BREAK = exports.MESSAGE_CONVERSION_LINE_BREAK = '<br is-replaced-linebreak>';
const MESSAGE_CONVERSION_LINE_BREAK_ESCAPED = exports.MESSAGE_CONVERSION_LINE_BREAK_ESCAPED = escapeHtmlInText(MESSAGE_CONVERSION_LINE_BREAK);
//# sourceMappingURL=escape.js.map

@@ -7,4 +7,4 @@ "use strict";

exports.unescapeBBCodeSquareBrackets = exports.parseBBCode = exports.escapeBBCodeSquareBrackets = void 0;
var _format = require("../../../constants/format");
var _findBBCode = require("./findBBCode");
const BB_CODE_HTML_TAG_PREFIX = 'bb-code-';
const BLOCK_LEVEL_TAGS = ['center', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];

@@ -78,3 +78,3 @@ const INLINE_LEVEL_TAGS = ['b', 'strong', 'i', 'em', 'u', 's', 'span', 'img'];

const isCustomTag = [...customBlockLevelTags, ...customInlineLevelTags].includes(Tag);
const htmlTag = isCustomTag ? `${BB_CODE_HTML_TAG_PREFIX}${Tag}` : Tag;
const htmlTag = isCustomTag ? `${_format.BB_CODE_HTML_TAG_PREFIX}${Tag}` : Tag;
const openingHtmlTag = `<${htmlTag}${Object.entries(parameters).length > 0 ? ' ' : ''}${Object.entries(parameters).map(([key, value]) => `${key}="${value}"`).join(' ')}>`;

@@ -81,0 +81,0 @@ const closingHtmlTag = `</${htmlTag}>`;

@@ -0,2 +1,3 @@

export { BB_CODE_HTML_TAG_PREFIX } from './constants/format';
export { formatStringToHtml } from './utils/formatString/formatString';
//# sourceMappingURL=index.js.map
export const escapeHtmlInText = text => text.replace(/</g, '&lt;').replace(/>/g, '&gt;');
export const MESSAGE_CONVERSION_LINE_BREAK = '<br is-replaced-linebreak>';
export const MESSAGE_CONVERSION_LINE_BREAK_ESCAPED = escapeHtmlInText(MESSAGE_CONVERSION_LINE_BREAK);
//# sourceMappingURL=escape.js.map

@@ -0,3 +1,3 @@

import { BB_CODE_HTML_TAG_PREFIX } from '../../../constants/format';
import { findFirstBBCode } from './findBBCode';
const BB_CODE_HTML_TAG_PREFIX = 'bb-code-';
const BLOCK_LEVEL_TAGS = ['center', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];

@@ -4,0 +4,0 @@ const INLINE_LEVEL_TAGS = ['b', 'strong', 'i', 'em', 'u', 's', 'span', 'img'];

@@ -0,1 +1,3 @@

export { BB_CODE_HTML_TAG_PREFIX } from './constants/format';
export type { TableObject } from './types/format';
export { formatStringToHtml } from './utils/formatString/formatString';
export declare const escapeHtmlInText: (text: string) => string;
export declare const MESSAGE_CONVERSION_LINE_BREAK = "<br is-replaced-linebreak>";
export declare const MESSAGE_CONVERSION_LINE_BREAK_ESCAPED: string;
export interface ParseBBCodesOptions {
customBlockLevelBBCodeTags?: string[];
customInlineLevelBBCodeTags?: string[];
}
interface ParseBBCodePrivateOptions extends ParseBBCodesOptions {
justEscapeSquareBrackets?: boolean;
}
export declare const parseBBCode: (text: string, options?: ParseBBCodesOptions) => string;
export declare const parseBBCode: (text: string, options?: ParseBBCodePrivateOptions) => string;
export declare const escapeBBCodeSquareBrackets: (text: string) => string;
export declare const unescapeBBCodeSquareBrackets: (text: string) => string;
export {};
{
"name": "@chayns-components/format",
"version": "5.0.0-beta.674",
"version": "5.0.0-beta.682",
"description": "A set of beautiful React components for developing your own applications with chayns.",

@@ -74,3 +74,3 @@ "sideEffects": false,

},
"gitHead": "0a809ee9a5e3883ddeb7e1d3ab6c8805e0665693"
"gitHead": "f70fcf3c45699b8c5ad2c439112cc1aada012553"
}

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

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