Skip to content

algeriatech/jokes.dz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jokes.dz

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

Slack Status npm npm

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

عندي نكتة!

ابعتلنا نضحكو معاك 😂

Joke template:

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

forthebadge