npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

viva-parser-fb2

v1.0.8

Published

parse text from fb2 format

Downloads

8

Readme

Classes

Typedefs

Parser_fb2

(license MIT) parse text from fb2 format, example - see example.js

Kind: global class

parser_fb2.book : type_book

result parse fb2-formatted text

Kind: instance property of Parser_fb2

parser_fb2.parse_error_list : Array.<Object>

rlist of parsing error

Kind: instance property of Parser_fb2

parser_fb2.parse(text) ⇒ boolean

parse fb2-formatted text

Kind: instance method of Parser_fb2
Returns: boolean - fb2 or not fb2

| Param | Type | Description | | --- | --- | --- | | text | string | fb2-formatted text |

parser_fb2.get_cover_image() ⇒ string

get book cover

Kind: instance method of Parser_fb2
Returns: string - image

parser_fb2.get_formatted_annotation([option]) ⇒ string

get book annotation as text

Kind: instance method of Parser_fb2
Returns: string - formatted text

| Param | Type | | --- | --- | | [option] | type_format |

parser_fb2.get_formatted_text([option]) ⇒ string

get book text

Kind: instance method of Parser_fb2
Returns: string - formatted text

| Param | Type | | --- | --- | | [option] | type_format |

type_author

Kind: global typedef
Properties

| Name | Type | | --- | --- | | last_name | string | | middle_name | string | | first_name | string |

type_sequence

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | title | string | series name | | position | number | position in series |

type_text

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | path | string | xml path | | style_list | Array.<Object> | styles | | data | string | piece of text | | link | Object | link to note | | new_line_before | boolean | add or not new line before this piece of text |

type_link

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | id | string | id link | | path | string | xml path | | style_list | Array.<Object> | styles | | data | string | piece of link | | new_line_before | boolean | add or not new line before this piece of link |

type_binary

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | id | string | id binary resource | | content_type | string | content type | | data | string | binary value |

type_book

Kind: global typedef
Properties

| Name | Type | | --- | --- | | title | string | | subtitle | string | | note | string | | origin_author | type_author | | origin_language | string | | translator_author | type_author | | translator_language | string | | sequence_list | Array.<type_sequence> | | genre_list | Array.<string> | | keyword_list | Array.<string> | | isbn | string | | cover_binary_id | string | | annotation | Array.<type_text> | | text | Array.<type_text> | | link | Array.<type_link> | | binary | Array.<type_binary> |

type_format

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | [format] | string | 'plain' or 'markdown', default 'plain' | | [indent] | string | indent for new paragraph, default ' ' (2 spaces) | | [eol] | boolean | allow end-of-line inside paragraph, default false |