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

idea-toolbox

Package Overview
Dependencies
Maintainers
2
Versions
377
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idea-toolbox - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

6

dist/utils.d.ts

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

import { ConverterOptions } from 'showdown';
import { markdown } from './markdown';
/**

@@ -57,6 +55,2 @@ * Utilities (static) functions, to support IDEA's projects.

/**
* Format a markdown string to html.
*/
export declare function mdToHtml(mdString: markdown | string, options?: ConverterOptions): string;
/**
* Get an array to iterate containing the keys of a string enum.

@@ -63,0 +57,0 @@ */

24

dist/utils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loopNumericEnumValues = exports.loopNumericEnumKeys = exports.getStringEnumKeyByValue = exports.loopStringEnumValues = exports.loopStringEnumKeys = exports.mdToHtml = exports.logger = exports.isEmpty = exports.joinArraysOnKeys = exports.cleanStr = exports.dateToLocale = exports.ISODateToItalianFormat = void 0;
const Validator = require("validator");
const showdown_1 = require("showdown");
exports.loopNumericEnumValues = exports.loopNumericEnumKeys = exports.getStringEnumKeyByValue = exports.loopStringEnumValues = exports.loopStringEnumKeys = exports.logger = exports.isEmpty = exports.joinArraysOnKeys = exports.cleanStr = exports.dateToLocale = exports.ISODateToItalianFormat = void 0;
const isEmail_1 = require("validator/lib/isEmail");
const isMobilePhone_1 = require("validator/lib/isMobilePhone");
const isURL_1 = require("validator/lib/isURL");
/**

@@ -112,7 +113,7 @@ * Utilities (static) functions, to support IDEA's projects.

case 'email':
return !Validator.isEmail(field);
return !isEmail_1.default(field);
case 'phone':
return !Validator.isMobilePhone(field, 'any');
return !isMobilePhone_1.default(field, 'any');
case 'url':
return !Validator.isURL(field);
return !isURL_1.default(field);
default:

@@ -142,13 +143,2 @@ return true;

/**
* Format a markdown string to html.
*/
function mdToHtml(mdString, options) {
if (!mdString)
return '';
options = options || { simpleLineBreaks: true };
const markdownConverter = new showdown_1.Converter(options);
return markdownConverter.makeHtml(mdString);
}
exports.mdToHtml = mdToHtml;
/**
* Get an array to iterate containing the keys of a string enum.

@@ -155,0 +145,0 @@ */

{
"name": "idea-toolbox",
"version": "6.1.0",
"version": "6.1.1",
"description": "IDEA's utility functions",

@@ -30,8 +30,6 @@ "engines": {

"dependencies": {
"showdown": "^1.9.1",
"validator": "^10.11.0"
"validator": "^13.5.2"
},
"devDependencies": {
"@types/showdown": "^1.9.3",
"@types/validator": "^9.4.4",
"@types/validator": "^13.1.2",
"prettier": "^2.0.2",

@@ -38,0 +36,0 @@ "tslint": "~5.15.0",

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