New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@magicyan/core

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magicyan/core - npm Package Compare versions

Comparing version
1.1.0
to
1.1.1
+5
-6
dist/functions/format.cjs
'use strict';
const validation = require('./validation.cjs');
function notFound(value) {

@@ -7,6 +9,6 @@ return value !== null ? value : void 0;

function brBuilder(...texts) {
return texts.flat().filter(nonNullish).join("\n");
return texts.flat().filter(validation.isDefined).map((txt) => `${txt}`).join("\n");
}
function spaceBuilder(...texts) {
return texts.flat().filter(nonNullish).join(" ");
return texts.flat().filter(validation.isDefined).map((txt) => `${txt}`).join(" ");
}

@@ -16,3 +18,3 @@ function replaceText(text, replaces) {

for (const prop in replaces) {
result = result.replaceAll(prop, replaces[prop]);
result = result.replaceAll(prop, `${replaces[prop]}`);
}

@@ -30,5 +32,2 @@ return result;

}
function nonNullish(v) {
return v !== null && v !== void 0;
}

@@ -35,0 +34,0 @@ exports.brBuilder = brBuilder;

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

import { isDefined } from './validation.mjs';
function notFound(value) {

@@ -5,6 +7,6 @@ return value !== null ? value : void 0;

function brBuilder(...texts) {
return texts.flat().filter(nonNullish).join("\n");
return texts.flat().filter(isDefined).map((txt) => `${txt}`).join("\n");
}
function spaceBuilder(...texts) {
return texts.flat().filter(nonNullish).join(" ");
return texts.flat().filter(isDefined).map((txt) => `${txt}`).join(" ");
}

@@ -14,3 +16,3 @@ function replaceText(text, replaces) {

for (const prop in replaces) {
result = result.replaceAll(prop, replaces[prop]);
result = result.replaceAll(prop, `${replaces[prop]}`);
}

@@ -28,6 +30,3 @@ return result;

}
function nonNullish(v) {
return v !== null && v !== void 0;
}
export { brBuilder, capitalize, limitText, notFound, replaceText, spaceBuilder };

@@ -12,5 +12,13 @@ 'use strict';

}
function isDefined(value) {
return value !== null && value !== void 0;
}
function isPromise(value) {
return typeof value === "object" && value !== null && typeof value.then === "function";
}
exports.isDefined = isDefined;
exports.isEmail = isEmail;
exports.isNumeric = isNumeric;
exports.isPromise = isPromise;
exports.isUrl = isUrl;

@@ -10,3 +10,9 @@ function isEmail(email) {

}
function isDefined(value) {
return value !== null && value !== void 0;
}
function isPromise(value) {
return typeof value === "object" && value !== null && typeof value.then === "function";
}
export { isEmail, isNumeric, isUrl };
export { isDefined, isEmail, isNumeric, isPromise, isUrl };

@@ -31,6 +31,8 @@ 'use strict';

exports.includesIgnoreCase = check.includesIgnoreCase;
exports.isDefined = validation.isDefined;
exports.isEmail = validation.isEmail;
exports.isNumeric = validation.isNumeric;
exports.isPromise = validation.isPromise;
exports.isUrl = validation.isUrl;
exports.withProperties = _with.withProperties;
exports.withTimeout = _with.withTimeout;

@@ -43,3 +43,6 @@ type Color = `#${string}` | string;

type MaybeString = string | null | undefined;
type CanBeString = string | {
toString(): string;
};
type MaybeString = CanBeString | null | undefined;
/**

@@ -120,3 +123,3 @@ * Ensures that a value is either kept as is (if not `null`) or converted to `undefined`.

*/
declare function replaceText<R extends Record<string, any>>(text: string, replaces: R): string;
declare function replaceText<R extends Record<string, CanBeString>>(text: string, replaces: R): string;
/**

@@ -299,2 +302,4 @@ * Capitalizes the first letter of a given word, or all words in a phrase if `allWords` is true.

declare function isNumeric(text: string): boolean;
declare function isDefined<T>(value: T): value is NonNullable<T>;
declare function isPromise<T = unknown>(value: unknown): value is Promise<T>;

@@ -343,3 +348,3 @@ /**

export { brBuilder, capitalize, createInterval, createLoopInterval, createTimeout, equalsIgnoreCase, hexToRgb, includesIgnoreCase, isEmail, isNumeric, isUrl, limitText, notFound, parseFloatOrDefault, parseIntOrDefault, random, randomNumber, replaceText, rgbToHex, sleep, spaceBuilder, withProperties, withTimeout };
export type { MaybeString };
export { brBuilder, capitalize, createInterval, createLoopInterval, createTimeout, equalsIgnoreCase, hexToRgb, includesIgnoreCase, isDefined, isEmail, isNumeric, isPromise, isUrl, limitText, notFound, parseFloatOrDefault, parseIntOrDefault, random, randomNumber, replaceText, rgbToHex, sleep, spaceBuilder, withProperties, withTimeout };
export type { CanBeString, MaybeString };

@@ -43,3 +43,6 @@ type Color = `#${string}` | string;

type MaybeString = string | null | undefined;
type CanBeString = string | {
toString(): string;
};
type MaybeString = CanBeString | null | undefined;
/**

@@ -120,3 +123,3 @@ * Ensures that a value is either kept as is (if not `null`) or converted to `undefined`.

*/
declare function replaceText<R extends Record<string, any>>(text: string, replaces: R): string;
declare function replaceText<R extends Record<string, CanBeString>>(text: string, replaces: R): string;
/**

@@ -299,2 +302,4 @@ * Capitalizes the first letter of a given word, or all words in a phrase if `allWords` is true.

declare function isNumeric(text: string): boolean;
declare function isDefined<T>(value: T): value is NonNullable<T>;
declare function isPromise<T = unknown>(value: unknown): value is Promise<T>;

@@ -343,3 +348,3 @@ /**

export { brBuilder, capitalize, createInterval, createLoopInterval, createTimeout, equalsIgnoreCase, hexToRgb, includesIgnoreCase, isEmail, isNumeric, isUrl, limitText, notFound, parseFloatOrDefault, parseIntOrDefault, random, randomNumber, replaceText, rgbToHex, sleep, spaceBuilder, withProperties, withTimeout };
export type { MaybeString };
export { brBuilder, capitalize, createInterval, createLoopInterval, createTimeout, equalsIgnoreCase, hexToRgb, includesIgnoreCase, isDefined, isEmail, isNumeric, isPromise, isUrl, limitText, notFound, parseFloatOrDefault, parseIntOrDefault, random, randomNumber, replaceText, rgbToHex, sleep, spaceBuilder, withProperties, withTimeout };
export type { CanBeString, MaybeString };

@@ -43,3 +43,6 @@ type Color = `#${string}` | string;

type MaybeString = string | null | undefined;
type CanBeString = string | {
toString(): string;
};
type MaybeString = CanBeString | null | undefined;
/**

@@ -120,3 +123,3 @@ * Ensures that a value is either kept as is (if not `null`) or converted to `undefined`.

*/
declare function replaceText<R extends Record<string, any>>(text: string, replaces: R): string;
declare function replaceText<R extends Record<string, CanBeString>>(text: string, replaces: R): string;
/**

@@ -299,2 +302,4 @@ * Capitalizes the first letter of a given word, or all words in a phrase if `allWords` is true.

declare function isNumeric(text: string): boolean;
declare function isDefined<T>(value: T): value is NonNullable<T>;
declare function isPromise<T = unknown>(value: unknown): value is Promise<T>;

@@ -343,3 +348,3 @@ /**

export { brBuilder, capitalize, createInterval, createLoopInterval, createTimeout, equalsIgnoreCase, hexToRgb, includesIgnoreCase, isEmail, isNumeric, isUrl, limitText, notFound, parseFloatOrDefault, parseIntOrDefault, random, randomNumber, replaceText, rgbToHex, sleep, spaceBuilder, withProperties, withTimeout };
export type { MaybeString };
export { brBuilder, capitalize, createInterval, createLoopInterval, createTimeout, equalsIgnoreCase, hexToRgb, includesIgnoreCase, isDefined, isEmail, isNumeric, isPromise, isUrl, limitText, notFound, parseFloatOrDefault, parseIntOrDefault, random, randomNumber, replaceText, rgbToHex, sleep, spaceBuilder, withProperties, withTimeout };
export type { CanBeString, MaybeString };

@@ -6,3 +6,3 @@ export { hexToRgb, rgbToHex } from './functions/convert.mjs';

export { equalsIgnoreCase, includesIgnoreCase } from './functions/check.mjs';
export { isEmail, isNumeric, isUrl } from './functions/validation.mjs';
export { isDefined, isEmail, isNumeric, isPromise, isUrl } from './functions/validation.mjs';
export { withProperties, withTimeout } from './functions/with.mjs';
{
"name": "@magicyan/core",
"version": "1.1.0",
"version": "1.1.1",
"description": "Template description",

@@ -5,0 +5,0 @@ "license": "MIT",