Liking cljdoc? Tell your friends :D

Changelog

Lasertag: A library for categorizing types of values in Clojure, ClojureScript, and Babashka.

0.13.0

2026-06-29

Significant progress in performance. Results for common value types should now return in nanoseconds.

Primary and secondary tag categorization is now much closer to its final form.

Potentially breaking changes

Refer to the new masterlists in "Added" section below. There may be some additional results in :all-tags entry (from tag-map) or some primary tags or secondary might be called something different now e.g. :inst -> :datetime. This lib is still alpha, so there could be some additional refinements going forward, but it is less likely and these tags are becoming more hardened.

  • For performance, simplicity, and separation of concerns, the map returned by tag-map is now limited to the following entries: [:tag :all-tags :classname :type] If you want/need coll-size or fn-info, there a couple new experimental public apis (see below).

Added/Changed

  • This is the new masterlist of primary tags:
[:agent
 :array
 :atom
 :boolean
 :char
 :datetime
 :delay
 :function
 :keyword
 :list
 :map
 :nil
 :number
 :queue
 :reader-conditional
 :ref
 :regex
 :seq
 :set
 :string
 :symbol
 :throwable
 :uuid
 :var
 :vector
 :volatile]
  • This is the new masterlist of secondary tags:
[:array-like
 :associative
 :big-decimal
 :big-int
 :byte
 :callable
 :carries-meta
 :char-sequence
 :coll
 :coll-like
 :cons
 :def
 :deferred
 :double
 :editable
 :error
 :exception
 :float
 :fractional
 :generator
 :global-this
 :hash-map
 :infinite
 :infinity
 :-infinity
 :inst
 :int
 :iterable
 :js
 :lazy
 :list-like
 :long
 :map-entry
 :map-like
 :multi-function
 :named
 :nan
 :nat-int
 :neg
 :neg-int
 :object
 :pos
 :pos-int
 :promise
 :range
 :ratio
 :real
 :record
 :reference
 :scalar
 :seqable
 :sequential
 :set-like
 :short
 :sorted
 :stack
 :subvec
 :transient
 :typed-array
 :whole
 :zero]
  • lasertag.core.coll-size* - Experimental utility for getting coll-size across platforms.

  • lasertag.fns.fn-info - Experimental utility for getting function info.

  • Enhanced tests across clj / cljs / bb.


0.12.0

2026-03-14

Potentially breaking changes

  • Bumped Clojure to version 1.11.1

  • If using with bb, requires v1.12.210 or higher

  • Changed the following tags in the :all-tags entry in map returned from lasertag.core/tag-map:
    :coll-type -> :coll-like

  • Removed the following redundant tags in the :all-tags entry in result of calling lasertag.core/tag-map:
    :number-type
    :java-lang-class
    :java-util-class

  • Removed the following options as they were not compatible with the new enhanced perf, or obsolete: :format :include-all-tags

Added

  • fireworks.cached namespace for enhanced perf - returns a "cached" result based on common value types

  • Added the support for the following missing primary tags:#30
    :atom :volatile :future :ref :agent :delay :byte :throwable

  • Added the support for the following missing secondary tags:
    :reference :lazy :deferred :scalar

Changed

  • Refactored core namespace for readability


0.11.6

2025-11-22

Changed

  • Refactored core namespace for readability

Added

  • distinct messaging namespace


0.11.5

2025-07-11

Fixed

  • Function name resolution bug for custom datatypes in Babashka

Added

  • Test runner for Babashka #24


0.11.4

2025-07-10

Fixed



0.11.3

2025-07-08

Fixed

  • Missing instance check for java.util.AbstractCollection in Babashka context #23


0.11.2

2025-06-14

Fixed

  • Refactored coll-size logic in lasertag.core/all-tags.
  • If coll-size cannot be determined :coll-size is now set to :lasertag.core/unknown-coll-size:

0.11.1

2025-04-25

Fixed

  • Changed the following keywords, internally only:
    :java.lang.Class -> :class

0.11.0

2025-04-01

Breaking changes

  • Changed the following tags (result of calling lasertag.core/tag):
    :js-object -> :object
    :js-promise -> :promise
    :js-iterable -> :iterable
    :java.lang.Class -> :class

  • Added :iterable to :all-tags entry of lasertag.core/tag-map return value, for all java values that are instances of java.lang.Iterable


0.10.1

2025-03-12

Fixed

  • Length of java primitive array using alength
  • Added error message for try-catch in all-tags, when resolving coll-size

0.10.0

2024-11-24

Breaking changes

  • Changed the following tags (result of calling lasertag.core/tag):
    :js/Set -> :set
    :js/Map -> :map
    :js/WeakSet -> :set
    :js/WeakMap -> :map
    :js/Array -> :array
    :js/ArrayBuffer -> :byte-array

  • Changed all tags that were namespaced with js/ to use a unified kebab-case convention, e.g.:
    js/Object -> :js-object
    js/Int8Array -> :js-int8-array

  • All typed arrays in JS now get tagged with :array, with a more granular tag e.g. :js-int8-array in the :all-tags entry of return value from lasertag.core/tag-map


0.9.0

2024-11-18

Breaking changes

  • Removed the following options:
:include-all-tags?              
:include-function-info?          
:include-js-built-in-object-info?
  • Added the following option (replaces the above 3)
(tag-map js/JSON
 {:exclude [:all-tags?              
            :function-info?          
            :built-in-object-info?]})

0.8.4

2024-11-18

Breaking changes

  • :inst tags #15
  • :number tags #14
  • renamed tag :NaN -> :nan
  • renamed tag :Infinity -> :infinity
  • renamed tag :-Infinity -> :-infinity

Changed

  • Converted all :demo entries in lasertag.cljs-interop to strings

Fixed

  • nil value TypeError in cljs #13

0.8.3

2024-11-15

Added

  • Safety code for babashka

0.8.2

2024-11-8

Fixed

  • 0f05e70: Fix bug with adding :js-object and js-array to :all-tags map

0.8.1

2024-11-7

Breaking changes

  • Fixed spelling of :lambda? in the return value of lasertag.core/tag-map

0.8.0

2024-11-6

Removed

Entries with a boolean value in the return value of lasertag.core/tag-map:

  • :carries-meta?
  • :coll-type?
  • :map-like?
  • :set-like?
  • :transient?
  • :number-type?
  • :java-lang-class?
  • :java-util-class?
  • :js-object?
  • :js-array?

Added

The following tags are conditionally added to the :all-tags entry (hashset) in the return value of lasertag.core/tag-map:

  • :carries-meta
  • :coll-type
  • :map-like
  • :set-like
  • :transient
  • :number-type
  • :java-lang-class
  • :java-util-class
  • :js-object
  • :js-array


<br>

## 0.7.0
2024-11-3
### Added
- The following new entries in the return value of `lasertag.core/tag-map`:<br>
  - `:set-like?`
  - `:java-util-class?`
  - `:java-lang-class?`
  - `:classname`

### Breaking changes
- Some instances of java classes are now given tags like `:set`, `:map`, `:seq`,
or `:array`.
  Examples:
```Clojure
  (tag (java.util.HashMap. {"a" 1 "b" 2}))   ; => :map
  (tag (java.util.HashSet. {"a" "b" "c"}))   ; => :set
  (tag (java.util.ArrayList. [1 2 3]))       ; => :array

0.6.0

2024-10-16

Added

  • If tag of coll is :seq, and coll is a list such as clojure.lang.PersistentList, then :list is added to the :all-tags entry in the return value from tag-map.

  • If coll is an array-map, :array-map is added to the :all-tags entry in the return value from tag-map:

(tag-map (array-map {"one" 1 "two" 2 "three" 3}))
=>
{:tag           :map
 :type          clojure.lang/PersistentArrayMap[]
 :carries-meta? true
 :all-tags      #{:coll :array-map :map}
 :coll-type?    true
 :map-like?     true
 :number-type?  false
 :coll-size     9}

0.5.1

2024-07-06

Fixed

  • Conditionally defines Atomics (js/Atomics), in case device does not support it.

Breaking Changes

  • Some reflection features may work differently if you are reflecting on an instance of js/Atomics.

0.5.0

2024-06-23

Added

  • Adds :carries-meta? entry to tag-map return value
  • Tag cljs.core/Cons and clojure.lang.Cons with :seq

Changed

  • All colls that pass the pred seq? will get tagged with :seq. No colls will get tagged with :list.

0.4.0 (Lasertag)

2024-03-16

  • Changed name of project to Lasertag #1

0.3.0

2024-02-27

Added

  • Collections that implement java.util.Collection get a :coll tag in :all-tags entry of result of typetag.core/tag-map
  • Support for PersistentTreeSet -> :set

Changed

  • Renamed :all-typetags -> :all-tags
  • Refactored js-built-in method resolver
  • Lowered Clojure dep from v1.11.0 -> v1.9.0

0.2.0

2024-02-13

Added

  • Support for tagging dom nodes
  • Support for js/ArrayBuffer
  • Support for js/Intl.*
  • Support for js/TypedArray
  • Support for returning string or symbol
  • :map-like? entry to result of typetag.core/tag-map
  • Support for instance properties on some js built-ins
  • Add support for #uuid and #inst

Fixed

  • js built-in tag for native fns

0.1.0

2023-11-17

Initial Commit

Can you improve this documentation?Edit on GitHub

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