
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Install with npm:
npm install dynreg -S
Then require and use it in your code:
const { dynreg } = require('dynreg');
// Generates a nums-only reg, Any of the following methods will do
dynreg('n').test(3) === true;
dynreg('N') === new Regex('^[0-9]$');
dynreg(['N']);
dynreg(['n']);
Dynreg currently provides only one API to generate the regex required for form validation.
It returns a regular expression object.
dynreg(Input);
For Input, They can be a combination of any letters in ['A','N','S','C'], The following formats are supported
dynreg('na') | dynreg(['n', 'a'])// 支持手动输入数字(N)、字母(A)
dynreg('nac') | | dynreg(['n', 'a', 'c']) // 支持手动输入数字(N)、字母(A)、文字(C)
dynreg('nacs') | dynreg(['n', 'a', 'c', 's'])// 支持手动输入数字(N)、字母(A)、文字(C)、符号(S)
dynreg('n') | dynreg(['n'])// 支持手动输入数字(N)
Notice: ['A','N','S','C'] is not case sensitive
FAQs
Dynamically generated regularization
We found that dynreg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.