Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@qgustavor/ass-parser

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qgustavor/ass-parser

Parse SSA/ASS subtitle format

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

ass-parser

Parse SSA/ASS subtitle format. Forked from eush77/ass-parser.

Changes:

  • All dependencies replaced with native modern JavaScript functions.
  • ES Modules instead of CommonJS.
  • Add detectStringifyOptions helper function.

Demo

https://codepen.io/qgustavor/full/YzaRXeX

API

assParser(text, [options])

Default export. Returns the parse tree.

Comments are ignored unless options.comments is set.

OptionTypeRequired?Default
commentsbooleanNofalse

Format

Subtitle is a list of sections, each of them has section and body properties. The body is a list of key-value bindings (descriptors), with key and value properties (type === 'comment' and value for comments).

value can be one of the following:

  • array if the descriptor key is "Format";
  • object if there is a "Format" descriptor above in the section;
  • string otherwise.

detectStringifyOptions(text)

Named export. Returns an options object to be passed to stringify in order to parse then stringify a subtitle with the minimal differences possible.

References

Install

npm install @qgustavor/ass-parser

License

MIT

Keywords

FAQs

Package last updated on 27 Dec 2022

Did you know?

Socket

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.

Install

Related posts

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