Need to learn Axon in a hurry? Try our new Axon Core eLearning course.Visit our website at to find out more.


Internet Chuck Norris Database (ICNDB) functions for Axon
afIcndbExtAxon funcs

Registered StackHub users may elect to receive email notifications whenever a new package version is released or a comment is posted on the forum.

There are 0 watchers.



Returns a list of joke categories ( Str ) available on the ICNDB. These may be used in limitTo and exclude options when retrieving a joke.

categories : afIcndbCategories()  // --> ["explicit", "nerdy"]

joke : afIcndbGet({
  "limitTo" : ["nerdy"]

joke : afIcndbGet({
  "exclude" : ["explicit"]

See for details.

Fantom signature:
@Axon static Str[] afIcndbCategories()
afIcndbGet(jokeId: null, options: null)

Returns a joke ( Dict ) from the Internet Chuck Norris Database (ICNDB).

jokeId should be an Number, but if null then a random joke is returned.

options is a Dict of options. If jokeId is null, then options can also be passed as the first argument. Valid options are:

  • firstName (Str) - a replacement for the name Chuck
  • lastName (Str) - a replacement the name Norris
  • limitTo (Str[]) - a list of categories to limit the jokes to
  • exclude (Str[]) - a list of categories to exclude

The returned Dict contains the keys id (Number), joke (Str), and categories (Str[]). Example:

joke : afIcndbGet(461)["joke"]  // --> "Chuck Norris finished World of Warcraft."

joke : afIcndbGet()["joke"]     // --> "Love does not hurt. Chuck Norris does."

joke : afIcndbGet({
  "firstName" : "Emma",
  "lastName"  : "Statham",
  "limitTo"   : ["nerdy"]
})["joke"]                      // --> "Emma Statham can install a 64 bit OS on 32 bit machines."

Since 0.0.4, if no exclude or limitTo options are defined then, to protect the innocent, explicit jokes are excluded.

See for details.

Fantom signature:
@Axon static Dict afIcndbGet(Obj? jokeId := null, Dict? options := null)

Returns the number of jokes on the ICNDB.

noOfJokes : afIcndbNoOfJokes()  // --> 546

See for details.

Fantom signature:
@Axon static Number afIcndbNoOfJokes()
Published by Fantom Factory

Products & Services by Fantom Factory

Packages by Fantom Factory

Commercial packages

Free packages