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

micromark-util-character

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-util-character - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

21

dev/index.d.ts

@@ -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

8

dev/index.js

@@ -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",

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