Function: org-babel-js-var-to-js

org-babel-js-var-to-js is a byte-compiled function defined in ob-js.el.gz.

Signature

(org-babel-js-var-to-js VAR)

Documentation

Convert VAR into a js variable.

Convert an elisp value into a string of js source code specifying a variable of the same value.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-js.el.gz
(defun org-babel-js-var-to-js (var)
  "Convert VAR into a js variable.
Convert an elisp value into a string of js source code
specifying a variable of the same value."
  (if (listp var)
      (concat "[" (mapconcat #'org-babel-js-var-to-js var ", ") "]")
    (replace-regexp-in-string "\n" "\\\\n" (format "%S" var))))