idea-toolbox
Advanced tools
Comparing version 6.1.0 to 6.1.1
@@ -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 @@ */ |
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
8
229989
6756
+ Addedvalidator@13.12.0(transitive)
- Removedshowdown@^1.9.1
- Removedansi-regex@4.1.1(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedcliui@5.0.0(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedemoji-regex@7.0.3(transitive)
- Removedfind-up@3.0.0(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedis-fullwidth-code-point@2.0.0(transitive)
- Removedlocate-path@3.0.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@3.0.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedrequire-main-filename@2.0.0(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedshowdown@1.9.1(transitive)
- Removedstring-width@3.1.0(transitive)
- Removedstrip-ansi@5.2.0(transitive)
- Removedvalidator@10.11.0(transitive)
- Removedwhich-module@2.0.1(transitive)
- Removedwrap-ansi@5.1.0(transitive)
- Removedy18n@4.0.3(transitive)
- Removedyargs@14.2.3(transitive)
- Removedyargs-parser@15.0.3(transitive)
Updatedvalidator@^13.5.2