Lasertag: Clojure(Script) utility for discerning types of values.
2024-11-3
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?
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
2024-10-16
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}
2024-07-06
Atomics
(js/Atomics
), in case device does not support it.js/Atomics
.2024-06-23
tag-map
return valuecljs.core/Cons
and clojure.lang.Cons
with :seq
seq?
will get tagged with :seq
. No colls will get tagged with :list
.2024-03-16
2024-02-27
java.util.Collection
get a :coll
tag in :all-tags
entry of result of typetag.core/tag-map
PersistentTreeSet
-> :set
:all-typetags
-> :all-tags
v1.11.0
-> v1.9.0
2024-02-13
js/ArrayBuffer
js/Intl.*
js/TypedArray
:map-like?
entry to result of typetag.core/tag-map
#uuid
and #inst
2023-11-17
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close