Need support? Click here
$ npm install anime-facts
$ yarn add anime-facts
Parameters | Type | Description |
---|---|---|
tags | String |
Filter random fact by tag(s). Takes a list of one or more tag names, separated by a comma (meaning AND ) or a pipe (meaning OR ). A comma separated list will match facts that have all of the given tags. While a pipe (| ) separated list will match facts that have either of the provided tags. |
minLength | Int |
The minimum Length in characters ( can be combined with maxLength ) |
maxLength | Int |
The maximum Length in characters ( can be combined with minLength ) |
const { getFact } = require("anime-facts");
getFact().then((fact) => console.log(fact));
const { getFact } = require("anime-facts");
// Note currently there are only fews tags, length available in the database. So, it might return the same data multiple times.
getFact(null, 1, 100).then((fact) => console.log(fact));
// Returns with:
{
id: 5,
tags: [ 'TEZUKA Osamu', 'Artist' ],
fact: 'TEZUKA Osamu is the most famous manga artist in Japan.',
length: 54
}
Functions | Description | Usage |
---|---|---|
getFact | Generate random anime facts. | random.getFact() |
@LamkasDev for adding facts to prior database. PR #1
@xMercyTheDeveloper for adding a fact to prior database. PR #2
@Lioness100 for adding types and improving codes in version 2.2.6. PR #3 and #4