Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
A JavaScript module to use Runme in Node.js, Deno or browser environments.
Runme.js contains the the Runme CLI as WASM and allows to access its functionality through a simple JavaScript interface.
You can run this module in Node.js and Deno environments.
Install the module through NPM:
$ npm install runme
# or Yarn
$ yarn add runme
You can also install the package globally and it as a CLI, e.g.:
npm i -g runme
runme list
You can import the module directly from the Deno module hosting service via https://deno.land/x/runme@0.4.3/mod.ts
.
The module exposes the following methods:
deserialize
Deserialize markdown into an AST:
import { deserialize } from 'runme'
// or when using Deno:
// import { deserialize } from 'https://deno.land/x/runme@0.4.3/mod.ts'
console.log(await deserialize(
'## Hello World\n' +
'```sh\n' +
'echo "Hello World"\n'
'```'
))
/**
* outputs:
* [{
* kind: 1,
* languageId: "",
* value: "# Hello World",
* }, {
* kind: 2,
* languageId: "sh",
* metadata: {
* "runme.dev/name": "echo-hello",
* },
* value: 'echo "Hello World"',
* }]
*/
serialize
Serialize an AST into markdown:
import { serialize } from 'runme'
// or when using Deno:
// import { serialize } from 'https://deno.land/x/runme@0.4.3/mod.ts'
console.log(await serialize([
{
kind: 1,
value: '# Hello World'
}, {
kind: 2
languageId: 'sh',
value: 'echo "Hello World"'
}
])
/**
* outputs:
* -----------------------
* ## Hello World
*
* ```sh
* echo "Hello World"
* ```
*
* -----------------------
*/
Copyright 2022 © Stateful – Apache 2.0 License
'# Hello World\n```sh\n```'),FAQs
A JavaScript module to use Runme in Node.js
The npm package runme receives a total of 130 weekly downloads. As such, runme popularity was classified as not popular.
We found that runme demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.