Socket
Socket
Sign inDemoInstall

javascript-repl

Package Overview
Dependencies
2
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    javascript-repl

The idea is to have a code editor where you can put in code or there is code prefilled and you see the result of the code and can edit the code.


Version published
Maintainers
1
Install size
3.41 MB
Created

Readme

Source

Browser REPL JS

The idea is to have a code editor where you can put in code or there is code prefilled and you see the result of the code and can edit the code.

Motivation

I give plenty of workshops with d3 and I used Codebin or similar tools in the past, but they have their downsides. There are not integrated with your website and take long to load. Sometime with these workshops the internet connection is not good, and I need an offline alternative.
I tried observable which is great for d3 and you can for the code and try it out yourself. But ypu need to learn the observable way before you can learn d3 and it only works with internet.

That's why I built the prototype in a day to test it out.

Usage outside a svelte app

new JavascriptRepl({
  target: document.querySelector('#code-example'),
  props: {
    files: [{name: 'index.js', content: code, type: 'js' }]
  }
});

Example how it looks like

FAQs

Last updated on 03 Jan 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc