API for cljs.util - clojurescript


Full namespace name: cljs.util

Overview





Public Variables and Functions



clojurescript-version

function
Usage: (clojurescript-version)
Returns clojurescript version as a printable string.

    
    
    
  


ext

function
Usage: (ext x)
Given a file, url or string return the file extension.

    
    
    
  


get-name

function
Usage: (get-name x)
Given a file or url return the last component of the path.

    
    
    
  


levenshtein-distance

function
Usage: (levenshtein-distance s t)
The the minimum number of single-element edits needed to
transform s in to t.

    
    
    
  


measure

macro
Usage: (measure msg expr)
       (measure enable msg expr)
Like cljs.core/time but toggleable and takes a message string.

    Added in clojurescript version 1.0


mkdirs

function
Usage: (mkdirs f)
Create all parent directories for the passed file.

    
    
    
  


ns->relpath

function
Usage: (ns->relpath ns)
       (ns->relpath ns ext)
Given a namespace as a symbol return the relative path. May optionally
provide the file extension, defaults to :cljs.

    
    
    
  


ns->source

function
Usage: (ns->source ns)
Given a namespace as a symbol return the corresponding resource if it exists.

    
    
    
  


suggestion

function
Usage: (suggestion threshold unknown knowns)
Provides a best suggestion for an unknown, taken from knowns,
minimizing the Levenshtein distance, returning nil if threshold
cannot be satisfied.

    
    
    
  


unknown-opts

function
Usage: (unknown-opts passed knowns)
Takes a set of passed opt keys and known opt keys and for each
unknown opt key returns a vector of the key and its (potentially
nil) suggestion.

    
    
    
  
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.