Skip to content

Commit

Permalink
update API
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jan 20, 2024
1 parent bdb6a18 commit 41a5f02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ <h1>
<header><h2>Direct API</h2></header>
<p>You can also run execute LIPS programaticaly (in Node.js/Webpack).</p>
<pre><code class="language-javascript">
var lips = require('@jcubic/lips');
var { exec } = require('@jcubic/lips');
// or
import lips from '@jcubic/lips';
import { exec } from '@jcubic/lips';
</code></pre>
<p>Then use it like this:</p>
<pre><code class="language-javascript">
lips.exec('(let ((a 10) (b 20)) (* a b))').then(result => {
exec('(let ((a 10) (b 20)) (* a b))').then(result => {
results.forEach(function(result) {
if (typeof result !== 'undefined') {
console.log(result.toString());
Expand Down
6 changes: 3 additions & 3 deletions index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ chmod a+x foo.scm
<header><h2>Direct API</h2></header>
<p>You can also run execute LIPS programaticaly (in Node.js/Webpack).</p>
<pre><code class="language-javascript">
var lips = require('@jcubic/lips');
var { exec } = require('@jcubic/lips');
// or
import lips from '@jcubic/lips';
import { exec } from '@jcubic/lips';
</code></pre>
<p>Then use it like this:</p>
<pre><code class="language-javascript">
lips.exec('(let ((a 10) (b 20)) (* a b))').then(result => {
exec('(let ((a 10) (b 20)) (* a b))').then(result => {
results.forEach(function(result) {
if (typeof result !== 'undefined') {
console.log(result.toString());
Expand Down

0 comments on commit 41a5f02

Please sign in to comment.