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.
(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"}]Map of supported entity types with their URL prefixes and labels.
Map of supported entity types with their URL prefixes and labels.
(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"
(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)"
(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"
Tier ranking labels from S (highest) to D (lowest).
Tier ranking labels from S (highest) to D (lowest).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |