Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/NickCellino/clj-browser-eval

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/NickCellino/clj-browser-eval

  • v0.0.6
  • Source
  • Go
  • Socket score

Version published
Created
Source

clj-browser-eval

This is a thing that lets you turn any HTML input field into a Clojure interpreter.

clj-browser-eval.gif

CodePen: https://codepen.io/nichelodean/pen/zYWEgeW

quick start

In your html:

<script src="https://cdn.jsdelivr.net/npm/clj-browser-eval@0.0.6/dist/index.js"></script>

<div clj-interpreter>
  <textarea clj-code></textarea>
  <button clj-eval>Evaluate</button>
  <pre clj-result></pre>
</div>

clj-interpreter marks the container div for an interpreter

clj-code marks the text input that you want to use as the input for the interpreter

clj-eval designates the button (or any clickable thing) that you want to use to trigger evaluation

clj-result (optional - results will be window.alert'ed if this is not provided) designates where the result should go

multiple interpreters on one page

You can do as many of these on a page as you like!

<script src="https://cdn.jsdelivr.net/npm/clj-browser-eval@0.0.6/dist/index.js"></script>

<div clj-interpreter>
  <textarea clj-code></textarea>
  <button clj-eval>Evaluate</button>
  <pre clj-result></pre>
</div>

<div clj-interpreter>
  <textarea clj-code></textarea>
  <button clj-eval>Evaluate</button>
  <pre clj-result></pre>
</div>

<div clj-interpreter>
  <textarea clj-code></textarea>
  <button clj-eval>Evaluate</button>
  <pre clj-result></pre>
</div>

installing with npm

npm install clj-browser-eval

some considerations

I have no idea what I'm doing and you should not use this for anything real.

credits

Made possible by scittle!

FAQs

Package last updated on 28 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc