Ob Javascript

Alternatives To Ob Javascript
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Electron Vue Cloud Music2,189
9 months ago29mitVue
🚀Electron + Vue 仿网易云音乐windows客户端
Canvas Fingerprinting11
5 years agomitJavaScript
POC of Canvas fingerprinting
Staffeli10
3 years ago3May 17, 201718otherPython
DIKU Support Tools for Canvas LMS
Figmaapi Framer9
5 years agoCoffeeScript
Framer examples to show how to query the Figma API
Ob Javascript9
6 years ago1Emacs Lisp
Waverolling9113 years ago22June 11, 2020TypeScript
To make it possible to show the wave of audio size more than 1GB in canvas.
Myweblibs5
2 months agoTypeScript
A collection of my personal web libraries.
Alternatives To Ob Javascript
Select To Compare


Alternative Project Comparisons
Readme

ob-javascript

  • support node and headless chrome
  • support requiring npm modules from node_modules
  • support session as well as one shoot evaluation
  • babel support
  • wait for promises to resolve
  • no need to return
  • avoid using let or const

supported header arguments

  • session
  • file
  • babel

examples

no return needed

#+BEGIN_SRC javascript
new Date
#+END_SRC

#+RESULTS:
: 2016-11-26T05:23:47.867Z

promise support

if the code block yields a promise, it will be inspected after resolution, the default timeout is 5 seconds

#+BEGIN_SRC javascript
fetch = require('node-fetch')

fetch('https://api.github.com/repos/zweifisch/ob-coffee/languages')
  .then(res => res.json())
#+END_SRC

#+RESULTS:
: { 'Emacs Lisp': 4069, JavaScript: 184 }

babel

requires `babel-cli`

#+BEGIN_SRC javascript :babel
import fetch from 'node-fetch'

(async () => {
  let res = await fetch('https://api.github.com/repos/zweifisch/ob-javascript/languages')
  return res.json()
})()
#+END_SRC

#+RESULTS:
: { 'Emacs Lisp': 3993, JavaScript: 864 }

file

if the code block yields buffer or stream, and :file is specified, the result will be written to disk

#+BEGIN_SRC javascript :file canvas.png
Canvas = require('canvas')
canvas = new Canvas(100, 100)
ctx = canvas.getContext('2d')

ctx.arc(50, 50, 50, -Math.PI * 0.5, Math.PI, false)
ctx.fillStyle = '#0ff'
ctx.fill()

canvas.toBuffer()
#+END_SRC

#+RESULTS:

canvas.png

headless chrome

#+BEGIN_SRC javascript :session http://gnu.org
document.querySelector('title').text
#+END_SRC

#+RESULTS:
: The GNU Operating System and the Free Software Movement
Popular Canvas Projects
Popular Fetch Projects
Popular Web User Interface Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Javascript
Emacs Lisp
Canvas
Fetch
Lisp