Socket
Socket
Sign inDemoInstall

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 1.2.0 to 2.0.0

23

dev/index.js

@@ -5,4 +5,3 @@ /**

import {codes} from 'micromark-util-symbol/codes.js'
import {unicodePunctuationRegex} from './lib/unicode-punctuation-regex.js'
import {codes} from 'micromark-util-symbol'

@@ -23,3 +22,3 @@ /**

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -38,3 +37,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -62,3 +61,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -95,3 +94,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -116,3 +115,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -132,3 +131,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -211,6 +210,6 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.
*/
export const unicodePunctuation = regexCheck(unicodePunctuationRegex)
export const unicodePunctuation = regexCheck(/\p{P}/u)

@@ -234,3 +233,3 @@ /**

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -258,4 +257,4 @@ */

function check(code) {
return code !== null && regex.test(String.fromCharCode(code))
return code !== null && code > -1 && regex.test(String.fromCharCode(code))
}
}

@@ -5,4 +5,2 @@ /**

import {unicodePunctuationRegex} from './lib/unicode-punctuation-regex.js'
/**

@@ -22,3 +20,3 @@ * Check whether the character code represents an ASCII alpha (`a` through `z`,

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -37,3 +35,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -61,3 +59,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -94,3 +92,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -115,3 +113,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -131,3 +129,3 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -206,6 +204,6 @@ */

* Code.
* @returns
* @returns {boolean}
* Whether it matches.
*/
export const unicodePunctuation = regexCheck(unicodePunctuationRegex)
export const unicodePunctuation = regexCheck(/\p{P}/u)

@@ -229,3 +227,3 @@ /**

* Code.
* @returns
* @returns {boolean}
* Whether it matches.

@@ -253,4 +251,4 @@ */

function check(code) {
return code !== null && regex.test(String.fromCharCode(code))
return code !== null && code > -1 && regex.test(String.fromCharCode(code))
}
}
{
"name": "micromark-util-character",
"version": "1.2.0",
"version": "2.0.0",
"description": "micromark utility to handle character codes",

@@ -30,4 +30,2 @@ "license": "MIT",

"type": "module",
"main": "index.js",
"types": "dev/index.d.ts",
"files": [

@@ -40,3 +38,2 @@ "dev/",

"exports": {
"types": "./dev/index.d.ts",
"development": "./dev/index.js",

@@ -46,4 +43,4 @@ "default": "./index.js"

"dependencies": {
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0"
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},

@@ -53,9 +50,3 @@ "scripts": {

},
"xo": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
"xo": false
}

@@ -341,8 +341,10 @@ # micromark-util-character

Projects maintained by the unified collective are compatible with all maintained
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
As of now, that is Node.js 16+.
Our projects sometimes work with older versions, but this is not guaranteed.
This package works with `micromark` version 3+.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-util-character@^2`, compatible with Node.js 16.
This package works with `micromark@^3`.

@@ -349,0 +351,0 @@ ## Security

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