New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

srt-to-vtt

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

srt-to-vtt - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

4

index.js

@@ -15,3 +15,5 @@ var split = require('split2')

.replace(/\{\/([ibu])\}/g, '</$1>')
.replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g, '$1.$2') + '\r\n\r\n'
.replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g, '$1.$2')
.replace(/\r\n\{\\an8\}/g, ' line:5%\r\n') +
'\r\n\r\n'
}

@@ -18,0 +20,0 @@

{
"name": "srt-to-vtt",
"version": "1.1.2",
"version": "1.1.3",
"description": "Transform stream that converts srt files to vtt files (html5 video subtitles)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -25,2 +25,12 @@ var tape = require('tape')

tape('one entry with position an8', function (t) {
var convert = srt2vtt()
convert.write('1\r\n00:00:35.490 --> 00:00:38.720\r\n{\\an8}<i><font color="#ffff00">hello\r\n\r\n')
convert.end()
convert.pipe(concat(function (data) {
t.same(data.toString(), 'WEBVTT FILE\r\n\r\n1\r\n00:00:35.490 --> 00:00:38.720 line:5%\r\n<i><font color="#ffff00">hello\r\n\r\n')
t.end()
}))
})
tape('two entries', function (t) {

@@ -27,0 +37,0 @@ var convert = srt2vtt()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc