
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
regexp-util
Advanced tools
utilities for generating regular expression
npm install regexp-util
import { charset } from 'regexp-util'
const regex = util
.charset(['a', 'g']) // a ~ g
.subtract(['c', 'e'])
.toRegExp()
const aResult = 'a'.test(regex) //=> true
const dResult = 'd'.test(regex) //=> false
declare abstract class Base {
isEmpty(): boolean
toString(flags?: string): string
toRegExp(flags?: string): RegExp
}
declare type CharsetInput =
| Charset
| string // char
| number // codepoint
| [string, string] // char: start to end (inclusive)
| [number, number] // codepoint: start to end (inclusive)
declare function charset(...inputs: CharsetInput[]): Charset
declare class Charset extends Base {
constructor(...inputs: CharsetInput[])
union(...inputs: CharsetInput[]): Charset
subtract(...inputs: CharsetInput[]): Charset
intersect(...inputs: CharsetInput[]): Charset
}
# lint
pnpm run lint
# build
pnpm run build
# test
pnpm run test
MIT © Ika
FAQs
utilities for generating regular expression
The npm package regexp-util receives a total of 36,762 weekly downloads. As such, regexp-util popularity was classified as popular.
We found that regexp-util demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.