Add general improvements to copy paste

Cleaning code and adding more safety checks
This commit is contained in:
Andrey Antukh 2023-11-22 09:37:48 +01:00
parent 37e4939af7
commit 783e0470be
11 changed files with 434 additions and 308 deletions

View file

@ -6,7 +6,7 @@
(ns app.util.object
"A collection of helpers for work with javascript objects."
(:refer-clojure :exclude [set! new get get-in merge clone contains? array?])
(:refer-clojure :exclude [set! new get get-in merge clone contains? array? into-array])
(:require
[cuerdas.core :as str]))
@ -14,6 +14,10 @@
[o]
(.isArray js/Array o))
(defn into-array
[o]
(js/Array.from o))
(defn create [] #js {})
(defn get