micromark-util-character
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -55,2 +55,22 @@ /** | ||
export function markdownSpace(code: Code): boolean | ||
/** | ||
* Check whether the character code represents Unicode punctuation. | ||
* | ||
* A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, | ||
* Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` | ||
* (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` | ||
* (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII | ||
* punctuation (see `asciiPunctuation`). | ||
* | ||
* See: | ||
* **\[UNICODE]**: | ||
* [The Unicode Standard](https://www.unicode.org/versions/). | ||
* Unicode Consortium. | ||
* | ||
* @param {Code} code | ||
* Code. | ||
* @returns {boolean} | ||
* Whether it matches. | ||
*/ | ||
export function unicodePunctuation(code: Code): boolean | ||
export function asciiAlpha(code: Code): boolean | ||
@@ -62,4 +82,3 @@ export function asciiAlphanumeric(code: Code): boolean | ||
export function asciiPunctuation(code: Code): boolean | ||
export function unicodePunctuation(code: Code): boolean | ||
export function unicodeWhitespace(code: Code): boolean | ||
export type Code = import('micromark-util-types').Code |
@@ -7,2 +7,4 @@ /** | ||
const unicodePunctuationInternal = regexCheck(/\p{P}/u) | ||
/** | ||
@@ -202,3 +204,3 @@ * Check whether the character code represents an ASCII alpha (`a` through `z`, | ||
* | ||
* @param code | ||
* @param {Code} code | ||
* Code. | ||
@@ -208,3 +210,5 @@ * @returns {boolean} | ||
*/ | ||
export const unicodePunctuation = regexCheck(/\p{P}/u) | ||
export function unicodePunctuation(code) { | ||
return asciiPunctuation(code) || unicodePunctuationInternal(code) | ||
} | ||
@@ -211,0 +215,0 @@ /** |
@@ -55,2 +55,22 @@ /** | ||
export function markdownSpace(code: Code): boolean | ||
/** | ||
* Check whether the character code represents Unicode punctuation. | ||
* | ||
* A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, | ||
* Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` | ||
* (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` | ||
* (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII | ||
* punctuation (see `asciiPunctuation`). | ||
* | ||
* See: | ||
* **\[UNICODE]**: | ||
* [The Unicode Standard](https://www.unicode.org/versions/). | ||
* Unicode Consortium. | ||
* | ||
* @param {Code} code | ||
* Code. | ||
* @returns {boolean} | ||
* Whether it matches. | ||
*/ | ||
export function unicodePunctuation(code: Code): boolean | ||
export function asciiAlpha(code: Code): boolean | ||
@@ -62,4 +82,3 @@ export function asciiAlphanumeric(code: Code): boolean | ||
export function asciiPunctuation(code: Code): boolean | ||
export function unicodePunctuation(code: Code): boolean | ||
export function unicodeWhitespace(code: Code): boolean | ||
export type Code = import('micromark-util-types').Code |
@@ -5,2 +5,4 @@ /** | ||
const unicodePunctuationInternal = regexCheck(/\p{P}/u) | ||
/** | ||
@@ -196,3 +198,3 @@ * Check whether the character code represents an ASCII alpha (`a` through `z`, | ||
* | ||
* @param code | ||
* @param {Code} code | ||
* Code. | ||
@@ -202,3 +204,5 @@ * @returns {boolean} | ||
*/ | ||
export const unicodePunctuation = regexCheck(/\p{P}/u) | ||
export function unicodePunctuation(code) { | ||
return asciiPunctuation(code) || unicodePunctuationInternal(code) | ||
} | ||
@@ -205,0 +209,0 @@ /** |
{ | ||
"name": "micromark-util-character", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "micromark utility to handle character codes", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
33159
635