
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
transcript-parser
Advanced tools
Parses plaintext speech/debate/radio transcripts into JavaScript objects. It is still in early development. Pull requests are welcome.
Tested for Node.js versions >= 4.4.6
npm install transcript-parser
const fs = require('fs');
const TranscriptParser = require('transcript-parser');
const tp = new TranscriptParser();
//Synchronous example
const parsed = tp.parseOneSync(fs.readFileSync('transcript.txt', {encoding: 'UTF-8'}));
console.log(parsed);
//Asynchronous example
fs.readFile('transcript.txt', (err, data) => {
if(err) return console.error('Error:', err);
tp.parseOne(data, (err, parsed => {
if(err) return console.error('Error:', err);
console.log(parsed);
}));
});
//Stream example
const stream = fs.createReadStream('transcript.txt', 'utf8');
tp.parseStream(stream, (err, parsed) => {
if(err) return console.error('Error:', err);
console.log(parsed);
});
The constructor for TranscriptParser accepts an options argument.
removeActions
trueremoveAnnotations
true[]).removeTimestamps
trueremoveAnnotations is true[##:##:##] format).removeUnknownSpeakers
falsenone.blacklist
[]aliases
{}Array of the aliases' regular expressions as the value.{ "Mr. Robot": [ /[A-Z\ ]*SLATER[A-Z\ ]*/ ] }
The parseStream() method parses a Stream and returns an object representing it.
This is the preferred method for parsing streams asynchronously as it doesn't have to load the entire transcript into memory (unlike parseOne()).
tp.parseOneSync(stream, callback)
stream
Readable stream to read.callback(err, data)
The parseOneSync() method parses a string and returns an object representing it.
tp.parseOneSync(transcript)
transcript
string.The parseOne() method parses a string and returns an object representing it.
tp.parseOne(transcript, callback)
transcript
string.callback(err, data)
The resolveAliasesSync() method resolves all aliases specified in the configuration passed to the TranscriptParser's constructor (see above).
Renames the names in the order list to match the new names in the transcript. Note that there is a signifigant performance penalty, so don't use this method unless you need it.
tp.resolveAliasesSync(data)
data
The resolveAliases() method resolves all aliases specified in the configuration passed to the TranscriptParser's constructor (see above).
Renames the names in the order list to match the new names in the transcript. Note that there is a signifigant performance penalty, so don't use this method unless you need it.
tp.resolveAliases(data, callback)
data
callback(err, resolved)
FAQs
Parses plaintext speech/debate/radio transcripts into JavaScript objects.
We found that transcript-parser 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.