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

@markuplint/shared

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markuplint/shared - npm Package Compare versions

Comparing version 3.8.0 to 4.0.0-alpha.1

2

lib/functions.d.ts

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

import type { Nullable } from './types';
import type { Nullable } from './types.js';
/**

@@ -3,0 +3,0 @@ * Converts a given value of string, string array, null, or undefined

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeHref = exports.decodeEntities = exports.nonNullableFilter = exports.noEmptyFilter = exports.toNonNullableArrayFromItemOrArray = exports.toNoEmptyStringArrayFromStringOrArray = void 0;
const html_entities_1 = require("html-entities");
import { decode as decodeHtmlEntities } from 'html-entities';
/**

@@ -15,7 +12,6 @@ * Converts a given value of string, string array, null, or undefined

*/
function toNoEmptyStringArrayFromStringOrArray(value) {
const array = typeof value === 'string' ? [value] : value !== null && value !== void 0 ? value : [];
export function toNoEmptyStringArrayFromStringOrArray(value) {
const array = typeof value === 'string' ? [value] : value ?? [];
return array.filter(noEmptyFilter);
}
exports.toNoEmptyStringArrayFromStringOrArray = toNoEmptyStringArrayFromStringOrArray;
/**

@@ -29,3 +25,3 @@ * Converts a given value of an item or an array of items into

*/
function toNonNullableArrayFromItemOrArray(value) {
export function toNonNullableArrayFromItemOrArray(value) {
const array = Array.isArray(value) ? value : [value];

@@ -35,3 +31,2 @@ // @ts-ignore

}
exports.toNonNullableArrayFromItemOrArray = toNonNullableArrayFromItemOrArray;
/**

@@ -44,6 +39,5 @@ * A filter function for use with the `Array.filter` method,

*/
function noEmptyFilter(item) {
export function noEmptyFilter(item) {
return item !== '';
}
exports.noEmptyFilter = noEmptyFilter;
/**

@@ -57,6 +51,5 @@ * A filter function for use with the Array.filter method,

*/
function nonNullableFilter(item) {
export function nonNullableFilter(item) {
return item != null;
}
exports.nonNullableFilter = nonNullableFilter;
/**

@@ -73,6 +66,5 @@ * Decodes the provided text by replacing HTML entities

*/
function decodeEntities(text) {
return (0, html_entities_1.decode)(text, { level: 'html5' });
export function decodeEntities(text) {
return decodeHtmlEntities(text, { level: 'html5' });
}
exports.decodeEntities = decodeEntities;
/**

@@ -88,3 +80,3 @@ * Decodes the provided URL string (href) using

*/
function decodeHref(href) {
export function decodeHref(href) {
try {

@@ -100,2 +92,1 @@ return decodeURIComponent(href);

}
exports.decodeHref = decodeHref;

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

export * from './functions';
export * from './types';
export * from './functions.js';
export * from './types.js';

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./functions"), exports);
tslib_1.__exportStar(require("./types"), exports);
export * from './functions.js';
export * from './types.js';

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

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};
{
"name": "@markuplint/shared",
"version": "3.8.0",
"version": "4.0.0-alpha.1",
"description": "Shared functions for Markuplint",

@@ -9,3 +9,8 @@ "repository": "git@github.com:markuplint/markuplint.git",

"private": false,
"main": "lib/index.js",
"type": "module",
"exports": {
".": {
"import": "./lib/index.js"
}
},
"types": "lib/index.d.ts",

@@ -25,3 +30,3 @@ "publishConfig": {

},
"gitHead": "4ab20276db48a6acb29a923ea8666890ca853442"
"gitHead": "22502ee22a378ae766033d687dbc0443e5ed35dc"
}
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