mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 01:36:11 +02:00
✨ Parsing and file builder
This commit is contained in:
parent
f197124ee5
commit
21aa23e7f5
9 changed files with 307 additions and 32 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
(ns app.util.object
|
||||
"A collection of helpers for work with javascript objects."
|
||||
(:refer-clojure :exclude [set! get get-in merge clone])
|
||||
(:refer-clojure :exclude [set! get get-in merge clone contains?])
|
||||
(:require
|
||||
[cuerdas.core :as str]
|
||||
[goog.object :as gobj]
|
||||
|
@ -22,6 +22,10 @@
|
|||
(let [result (get obj k)]
|
||||
(if (undefined? result) default result))))
|
||||
|
||||
(defn contains?
|
||||
[obj k]
|
||||
(some? (unchecked-get obj k)))
|
||||
|
||||
(defn get-keys
|
||||
[obj]
|
||||
(js/Object.keys ^js obj))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue