Merge pull request #5010 from penpot/eva-replace-tabs-component

♻️ Replace tabs component
This commit is contained in:
Andrey Antukh 2024-08-22 10:31:22 +02:00 committed by GitHub
commit 4765685440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 512 additions and 729 deletions

View file

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