<commit_before>(ns cljsbuild-ui.util)

;;------------------------------------------------------------------------------
;; Require Modules
;;------------------------------------------------------------------------------

(def js-path (js/require "path"))

;;------------------------------------------------------------------------------
;; Util Functions
;;------------------------------------------------------------------------------

(defn path-join
  "Create a path string from given args with OS-specific path separators"
  [& args]
  (let [path-join (aget js-path "join")]
    (apply path-join args)))

(def on-windows?
  (.test #"^win" js/process.platform))

(defn log
  "Log a Clojure thing."
  [clj-thing]
  (js/console.log (pr-str clj-thing)))

(defn js-log
  "Log a JavaScript thing."
  [js-thing]
  (js/console.log js-thing))

(defn now
  "Returns the current UNIX timestamp in seconds."
  []
  (.unix (js/moment)))
<commit_msg>add mac and linux detection<commit_after>(ns cljsbuild-ui.util)

;;------------------------------------------------------------------------------
;; Require Modules
;;------------------------------------------------------------------------------

(def js-path (js/require "path"))

;;------------------------------------------------------------------------------
;; Util Functions
;;------------------------------------------------------------------------------

(defn path-join
  "Create a path string from given args with OS-specific path separators"
  [& args]
  (let [path-join (aget js-path "join")]
    (apply path-join args)))

(def on-windows?
  (.test #"^win" js/process.platform))

(def on-mac?
  (.test #"^darwin" js/process.platform))

(def on-linux?
  (.test #"^linux" js/process.platform))

(defn log
  "Log a Clojure thing."
  [clj-thing]
  (js/console.log (pr-str clj-thing)))

(defn js-log
  "Log a JavaScript thing."
  [js-thing]
  (js/console.log js-thing))

(defn now
  "Returns the current UNIX timestamp in seconds."
  []
  (.unix (js/moment)))

{'fraction_non_alphanumeric': 0.4285002491280518, 'fraction_numerical': 0.0, 'mean_word_length': 1.1475935828877006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5914526', 'n_tokens_mistral': 551, 'n_tokens_neox': 533, 'n_words': 148}