mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
✨ Add obj/array? helper
This commit is contained in:
parent
b1e54a9714
commit
e6f8022de0
2 changed files with 6 additions and 2 deletions
|
@ -42,7 +42,7 @@
|
|||
|
||||
(defn propagate-wrapper-styles
|
||||
([children wrapper-props]
|
||||
(if (.isArray js/Array children)
|
||||
(if ^boolean (obj/array? children)
|
||||
(->> children (map #(propagate-wrapper-styles-child % wrapper-props)))
|
||||
(-> children (propagate-wrapper-styles-child wrapper-props)))))
|
||||
|
||||
|
|
|
@ -6,11 +6,15 @@
|
|||
|
||||
(ns app.util.object
|
||||
"A collection of helpers for work with javascript objects."
|
||||
(:refer-clojure :exclude [set! new get get-in merge clone contains?])
|
||||
(:refer-clojure :exclude [set! new get get-in merge clone contains? array?])
|
||||
(:require
|
||||
["lodash/omit" :as omit]
|
||||
[cuerdas.core :as str]))
|
||||
|
||||
(defn array?
|
||||
[o]
|
||||
(.isArray js/Array o))
|
||||
|
||||
(defn create [] #js {})
|
||||
|
||||
(defn get
|
||||
|
|
Loading…
Add table
Reference in a new issue