
Security News
pnpm 10.16 Adds New Setting for Delayed Dependency Updates
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
smpl-pstrscan
Advanced tools
PStringScanner is a simple string tokenizer that provides for lexical scanning operations on a string.
It's the third port of the Ruby library into JavaScript. However, where the other ports concentrated on the interface, this one concentrates on speed.
The original Ruby version was written in C, and is very fast. This version, while not in C, is as fast on short strings (under 32 Kb of characters), and almost twice as fast on large strings (million+ characters) than the other ports.
npm install -g pstrscan
Scanning a string means keeping track of and advancing a position (a zero-based index into the source string) and matching regular expressions against the portion of the source string after the position.
var PStrScan = require("pstrscan");
var s = new PStrScan("This is a test");
s.scan(/\w+/); // = "This"
s.scan(/\w+/); // = null
s.scan(/\s+/); // = " "
s.scan(/\s+/); // = null
s.scan(/\w+/); // = "is"
s.hasTerminated(); // = false
s.scan(/\s+/); // = " "
s.scan(/(\w+)\s+(\w+)/); // = "a test"
s.getMatch(); // = "a test"
s.getCapture(1); // = "a"
s.getCapture(2); // = "test"
s.hasTerminated(); // = true
The interface should be familiar to those familiar with the original library, and the one originally ported to JavaScript/Node. There are some slight differences, but you should be able to gleam those from the source file.
unscan
history/capability.FAQs
A simple, fast string tokenizer for lexical scanning operations.
We found that smpl-pstrscan 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
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.