mirror of
https://github.com/penpot/penpot.git
synced 2026-03-05 17:51:17 +00:00
✨ Add obj/array? helper
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user