الجزايريين زهوانيين يحبو يضحكو
Install:
yarn add jokes.dz
or npm i --save jokes.dz
Start using:
const nukat = require('jokes.dz')
console.log(`We have ${nukat.count} jokes available for you! ashba3 da7k ;P`)
// Get all jokes
console.log(nukat.all)
// or just a random one
console.log(nukat.random())
// Find all jokes using a regular expression
console.log(nukat.search('m.l\s5tah|s[3e]1IeL'))
console.log(nukat.search(/fakakir|ber(ou|w)ita/))
// Filter all jokes in french language. If not argument is specified it defaults to 'ar'
console.log(nukat.filterByLang('fr'))
// Filter by tags. Accepts an Array or comma separated string of tags
console.log(nukat.filterByTag('education,fakakir'))
console.log(nukat.filterByTag([ 'education', 'fakakir' ]))
ابعتلنا نضحكو معاك 😂
Joke template:
{
"lang": "ar",
"joke": "قالك واحد السيد.....",
"img": "https://link.to/img.jpg",
"tags": [ "قراية", "صوارد", "طراطق" ]
}