mirror of
https://github.com/penpot/penpot.git
synced 2025-07-20 21:57:13 +02:00
♻️ Replace layer tabs component with the new tab switcher component
This commit is contained in:
parent
1782837a38
commit
3df9c88bb7
6 changed files with 236 additions and 99 deletions
|
@ -6,7 +6,9 @@
|
|||
|
||||
(ns app.util.array
|
||||
"A collection of helpers for work with javascript arrays."
|
||||
(:refer-clojure :exclude [conj! conj filter]))
|
||||
(:refer-clojure :exclude [conj! conj filter map reduce find])
|
||||
(:require
|
||||
[cljs.core :as c]))
|
||||
|
||||
(defn conj
|
||||
"A conj like function for js arrays."
|
||||
|
@ -49,3 +51,19 @@
|
|||
"A specific filter for js arrays."
|
||||
[pred ^js/Array o]
|
||||
(.filter o pred))
|
||||
|
||||
(defn map
|
||||
[f a]
|
||||
(.map ^js/Array a f))
|
||||
|
||||
(defn reduce
|
||||
[f init val]
|
||||
(.reduce ^js/Array val f init))
|
||||
|
||||
(defn find-index
|
||||
[f v]
|
||||
(.findIndex ^js/Array v f))
|
||||
|
||||
(defn find
|
||||
[f v]
|
||||
(.find ^js/Array v f))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue