
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
flat-text-sequencer
Advanced tools
Looking to parse a custom text model, render markdown, or highlight code? Here's a module that chunks text into a sequence of typed ranges by pattern.
sequence('*if only* there was a way to make `this` a __sequence__', [
{ type: 'strong', pattern: /__.+?__/g },
{ type: 'em', pattern: /\*.+?\*/g },
{ type: 'code', pattern: /`.+?`/g }
])
From text to a sequence.
[
{ type: ['em'], data: '*if only*' },
{ type: [], data: ' there was a way to make ' },
{ type: ['code'], data: '`this`' },
{ type: [], data: ' a ' },
{ type: ['strong'], data: '__sequence__' }
]
Install it with npm:
npm install --save flat-text-sequencer
Load the package to your application:
const sequenceText = require('flat-text-sequecner')
And call it with your data:
const sequence = sequenceText(text, patterns)
Flat text sequencer exports a single function with the following signature:
(text: string, patterns: [{ type: string, pattern: RegExp }])
-> [{ type: [string], data: string }]
Joonatan Vuorinen (@bearror)
FAQs
Turns text to a sequence of typed ranges
The npm package flat-text-sequencer receives a total of 0 weekly downloads. As such, flat-text-sequencer popularity was classified as not popular.
We found that flat-text-sequencer 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 Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.