
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
A specialized tokenizer for finding dust-style tags ({@tagname [attributes]/})
String tokenizer configured to recognize a particular pattern: {@[A-Za-z._] [attrs...]/}
.
This factory method creates a ParseStream initialized with the provided entity handler.
var finder = require('findatag');
var stream = finder.createParseStream(handler);
fs.createReadStream('./file/to/process').pipe(stream).pipe(process.stdout);
Reads the file at the given file path and parses it, passing entity information to the provided entity handler.
var finder = require('findatag');
finder.process('./file/to/process', handler, function (err, result) {
// result is the full processed file
});
The parser needs to be provided with an entity handler that provides the implementation for what to be done when the parse encounters a particular entity: tag or text.
Getter exposing an array of strings or a comma-delimited string containing the names of tags recognized by this handler.
The method invoked when any given tag is enountered. The tag definition is has the structure:
{
name: 'tagname',
attributes: {
'attributeName': 'attributeValue'
}
}
The callback has the signature function (err, result)
and should be invoked with the string with which to replace the
original tag.
// ...
onTag: function (def, cb) {
cb(null, def.name.toUpperCase());
}
//...
This optional delegate method can perform operations on the provide text chunk. The callback has the signature
function (err, result)
and should be invoked with the string with which to replace the original text.
var finder = require('findatag');
var entityHandler = {
_handlers: {
'pre': { ... },
'foo': { ... }
},
get tags () {
return Object.keys(this._handlers);
},
onTag: function (def, cb) {
this._handlers[def.name].exec(def, cb);
},
onText: function (chunk, cb) {
cb(null, chunk.toUpperCase();
}
}
FAQs
A specialized tokenizer for finding dust-style tags ({@tagname [attributes]/})
The npm package findatag receives a total of 290 weekly downloads. As such, findatag popularity was classified as not popular.
We found that findatag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.