0.1.0 • Published 7 years ago

jokes.dz v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Jokes.dz

الجزايريين زهوانيين يحبو يضحكو

Getting started

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' ]))

عندي نكتة!

ابعتلنا نضحكو معاك :joy:

Joke template:

{
    "lang": "ar",
    "joke": "قالك واحد السيد.....",
    "img": "https://link.to/img.jpg",
    "tags": [ "قراية", "صوارد", "طراطق" ]
}

Made with 💕 by these fun contributors