Liking cljdoc? Tell your friends :D

dropthe.core

Utility functions for working with DropThe entity data. Provides slug generation, URL construction, tier formatting, and entity type definitions for the DropThe knowledge graph.

Utility functions for working with DropThe entity data.
Provides slug generation, URL construction, tier formatting,
and entity type definitions for the DropThe knowledge graph.
raw docstring

entity-breadcrumbclj

(entity-breadcrumb entity-type entity-name)

Generate a breadcrumb trail for an entity as a vector of maps. Each map contains :label and :path keys.

(entity-breadcrumb :movies "Inception") ;; => [{:label "Home" :path "/"} ;; {:label "Movies" :path "/movies"} ;; {:label "inception" :path "/movies/inception"}]

Generate a breadcrumb trail for an entity as a vector of maps.
Each map contains :label and :path keys.

(entity-breadcrumb :movies "Inception")
;; => [{:label "Home" :path "/"}
;;     {:label "Movies" :path "/movies"}
;;     {:label "inception" :path "/movies/inception"}]
sourceraw docstring

entity-typesclj

Map of supported entity types with their URL prefixes and labels.

Map of supported entity types with their URL prefixes and labels.
sourceraw docstring

entity-urlclj

(entity-url entity-type entity-name)

Build a full URL path for an entity given its type and name. Returns nil if the entity type is not recognized.

(entity-url :movies "The Dark Knight") ;; => "/movies/the-dark-knight"

(entity-url :crypto "Bitcoin") ;; => "/cryptocurrencies/bitcoin"

Build a full URL path for an entity given its type and name.
Returns nil if the entity type is not recognized.

(entity-url :movies "The Dark Knight")
;; => "/movies/the-dark-knight"

(entity-url :crypto "Bitcoin")
;; => "/cryptocurrencies/bitcoin"
sourceraw docstring

format-tierclj

(format-tier tier-letter)

Format a tier letter into a display string with its label. Returns nil for unrecognized tier letters.

(format-tier "S") ;; => "S-Tier (Legendary)"

(format-tier "B") ;; => "B-Tier (Notable)"

Format a tier letter into a display string with its label.
Returns nil for unrecognized tier letters.

(format-tier "S")
;; => "S-Tier (Legendary)"

(format-tier "B")
;; => "B-Tier (Notable)"
sourceraw docstring

slugifyclj

(slugify s)

Convert a string into a URL-safe slug. Lowercases, replaces non-alphanumeric characters with hyphens, and collapses consecutive hyphens.

(slugify "The Dark Knight (2008)") ;; => "the-dark-knight-2008"

Convert a string into a URL-safe slug.
Lowercases, replaces non-alphanumeric characters with hyphens,
and collapses consecutive hyphens.

(slugify "The Dark Knight (2008)")
;; => "the-dark-knight-2008"
sourceraw docstring

tier-labelsclj

Tier ranking labels from S (highest) to D (lowest).

Tier ranking labels from S (highest) to D (lowest).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close