From 9a83349d691b4cbcaa498984e7b278a6b093eb2e Mon Sep 17 00:00:00 2001 From: Jeroen van Dijk <27645+jeroenvandijk@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:24:35 +0300 Subject: [PATCH] Add goog.string/format #118 (#119) * Add goog.string/format #118 Also add empty goog.string.format for Cljs compatibility * Update changelog --- CHANGELOG.md | 2 ++ src/scittle/core.cljs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0847390..431fc4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ +- [#118](https://github.com/babashka/scittle/issues/118): add `goog.string/format` ([@jeroenvandijk](https://github.com/jeroenvandijk)) + ## v0.7.23 (2025-06-18) - [#107](https://github.com/babashka/scittle/issues/107): add `replicant` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk)) diff --git a/src/scittle/core.cljs b/src/scittle/core.cljs index ee5ec27..6ba88ad 100644 --- a/src/scittle/core.cljs +++ b/src/scittle/core.cljs @@ -3,6 +3,7 @@ (:require [cljs.reader :refer [read-string]] [goog.object :as gobject] [goog.string :as gstring] + [goog.string.format] [sci.core :as sci] [sci.ctx-store :as store] [sci.impl.unrestrict] @@ -46,7 +47,9 @@ 'abs (sci/copy-var abs cljns)} 'goog.object {'set gobject/set 'get gobject/get} - 'goog.string {'htmlEscape gstring/htmlEscape} + 'goog.string {'format gstring/format + 'htmlEscape gstring/htmlEscape} + 'goog.string.format {} ;; For cljs compatibility 'sci.core {'stacktrace sci/stacktrace 'format-stacktrace sci/format-stacktrace}})