anime-name-tool
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

AnimeNameTool

A parser for japanese anime filenames.

With full typescript support.

Links

Usage

  1. Install this packege by your package manager.
  2. Import it.
import { parseFileName } from "anime-name-tool";

const result = parseFileName(
  "[Sakurato] RWBY Hyousetsu Teikoku [05][HEVC-10bit 1080p AAC][CHS&CHT].mp4"
);

console.log(result);
  1. See the result.
{
  title: 'RWBY Hyousetsu Teikoku',
  year: null,
  episode: 5,
  episodeIndex: { index: 35, length: 2, content: '05' },
  group: [ { name: 'Sakurato', parsedName: '桜都字幕组' } ],
  groupIndex: { index: 0, length: 10, content: '[Sakurato]' },
  subtitle: { language: [ 'CHS', 'CHT' ], subtitleFeatures: [] },
  source: { broadcastChannel: [], mediaType: [] },
  quality: {
    videoCodec: 'HEVC',
    audioCodec: 'AAC',
    resolution: '1080P',
    fps: null,
    color: '10bit'
  },
  extension: { name: 'mp4', parsedName: 'MP4', type: 'Video' }
}

TypeScript

This package is full typed. The result of parseFileName is typed as ParseResult.

See type definition here.

Readme

Keywords

Package Sidebar

Install

npm i anime-name-tool

Weekly Downloads

7

Version

1.0.6

License

MIT

Unpacked Size

76.6 kB

Total Files

8

Last publish

Collaborators

  • magmablock