searchAnime
searchAnime()
This function is used to search for similar animes using its title(anime name).
Parameters
-
animeName
This parameter is to give the anime name to search for in DB
-
ratio
This parameter specifies the similarity of search to result. The values range from 0.1 to 1. If inputted 1, it means 100% similarity. (Default 0.4)
Usage
1st Method:
const { searchAnime } = require('anichu.db');
( async () => { const res = await searchAnime('sword art online'); // or const res = await searchAnime('sword art online', 0.8); console.log(res);})();
2nd Method:
const anidb = require('anichu.db');
( async () => { const res = await anidb.anime.search('sword art online '); // or const res = await anidb.anime.search('sword art online ', 0.6); console.log(res);})();
This function returns a maximum of 10 entries only so that the output window won’t get clogged.