This small library provides constructors & Clojurescript sequence converters for JavaScript typed arrays and ArrayBuffers.
0.1.7[org.clojure/clojure "1.11.1"][org.clojure/clojurescript "1.11.4"][com.cemerick/clojurescript.test "0.3.3"][lein-cljsbuild "1.1.8"]This project is written in a literate programming format and requires
Emacs & Org-mode to generate usable source code. Assuming both tools
are installed, the easiest way to generate a working project is via
command line (make sure emacs is on your path or else edit its path
in tangle.sh):
git clone https://github.com/thi.ng/typedarrays.git
cd typedarrays
./tangle.sh src/*.org test/*.orgTangling is the process of extracting & combining source blocks from
.org files into an actual working project/source tree. Once tangling
is complete, you can cd into the generated project directory
(babel) and then use lein as usual.
The project.clj file defines an alias to trigger a complete build &
tests. Since PhantomJS (the usual test runner for other thi.ng
projects) doesn’t support typed arrays, the cleantest command will
run the tests in your default browser. Test results are displayed in
the dev console.
cd babel
lein cleantestTangling this file will also generate a small HTML harness for the
resulting JS file and will be placed in the main folder
(babel/index.html), allowing for further experimentation in the
browser.
(defproject thi.ng/typedarrays "<<version>>"
:description "CLJS typed arrays functions"
:url "<<project-url>>"
:license {:name "Apache Software License 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"
:distribution :repo}
:scm {:name "git"
:url "git@github.com:thi-ng/typedarrays.git"}
:min-lein-vesion "2.4.0"
:dependencies [<<dep-clj>>
<<dep-cljs>>]
:profiles {:dev {:plugins [<<dep-cljsbuild>>
<<dep-cljs-test>>]
:global-vars {*warn-on-reflection* true}
:jvm-opts ^:replace []
:aliases {"cleantest" ["do" "clean," "cljsbuild" "test"]}}}
:cljsbuild {:builds [{:id "simple"
:source-paths ["src" "test"]
:compiler {:output-to "<<cljs-artefact-path>>"
:optimizations :whitespace
:pretty-print true}}]
:test-commands {"unit-tests" ["open" :runner "index.html"]}}
:pom-addition [:developers [:developer
[:name "Karsten Schmidt"]
[:url "https://thi.ng"]
[:timezone "1"]]])<!DOCTYPE html>
<html lang="en">
<head>
<title><<lein-coords>> test</title>
</head>
<body>
<script type="text/javascript" src="<<cljs-artefact-path>>"></script>
</body>
</html>The autogenerated namespace thi.ng.typedarrays.version contains a single
symbol version holding the version string defined above:
(use '[thi.ng.typedarrays.version])
(prn version)
; "<<version>>"| Version | Released | Description | Tagged Github URL |
|---|---|---|---|
| 0.1.7 | 2022-04-23 | update description | 0.1.7 |
| 0.1.6 | 2016-07-02 | add .slice polyfill, update cljs dep | 0.1.6 |
| 0.1.5 | 2016-04-28 | add array view fns, bugfix ctors, update deps | 0.1.5 |
| 0.1.3 | 2016-03-19 | bugfix TA check, update ctors | 0.1.3 |
| 0.1.2 | 2015-06-04 | remove obsolete namespaces | 0.1.2 |
| 0.1.1 | 2015-05-31 | update array check | 0.1.1 |
| 0.1.0 | 2015-05-26 | initial test release | 0.1.0 |
| Name | Role | Website |
|---|---|---|
| Karsten Schmidt | initiator & principal developer | https://thi.ng |
This project is open source and licensed under the Apache Software License 2.0.