Parsing and file builder

This commit is contained in:
alonso.torres 2021-06-02 15:51:20 +02:00 committed by Andrés Moya
parent f197124ee5
commit 21aa23e7f5
9 changed files with 307 additions and 32 deletions

View file

@ -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))