Syntax highlighting, like GitHub

Overview

Close up of The Starry Night by Vincent van Gogh (1889)
with examples of starry-night over it


starry-night

Build Coverage Downloads Size

Syntax highlighting, like what GitHub uses to highlight code, but free and open source and JavaScript!

Contents

What is this?

This package is an open source version of GitHub’s closed-source PrettyLights project (more on that later). It supports 490 grammars and its extremely high quality. It uses TextMate grammars which are also used in popular editors (SublimeText, Atom, VS Code, &c). They’re heavy but high quality.

When should I use this?

starry-night is a high quality highlighter (when your readers or authors are programmers, you want this!) that can support tons of grammars (from new things like Astro to much more!) which approaches how GitHub renders code.

It has a WASM dependency, and rather big grammars, which means that starry-night might be too heavy particularly in browsers, in which case lowlight or refractor might be more suitable.

This project is similar to the excellent shiki, and it uses the same underlying dependencies, but starry-night is meant to match GitHub in that it produces classes and works with the CSS it ships, making it easier to add dark mode and other themes with CSS compared to inline styles.

Finally, this package produces objects (an AST), which makes it useful when you want to perform syntax highlighting in a place where serialized HTML wouldn’t work or wouldn’t work well. For example, when you want to show code in a CLI by rendering to ANSI sequences, when you’re using virtual DOM frameworks (such as React or Preact) so that diffing can be performant, or when you’re working with hast or rehype.

Bundled, minified, and gzipped, starry-night and the WASM binary are 185 kB. There are two lists of grammars you can use: common (33 languages, good for your own site) adds 160 kB and all (490 languages, useful if are making a site like GitHub) is 1.35 MB. You can also manually choose which grammars to include (or add to common): a language is typically between 3 and 5 kB. As an example, adding Astro to starry-night with the common grammars costs an additional 1.5 kB.

What is PrettyLights?

PrettyLights is the syntax highlighter that GitHub uses to turn this:

```markdown
# Hello, world!
```

…into this:

<span class="pl-mh"><span class="pl-mh">#</span><span class="pl-mh"> </span>Hello, world!</span>

…which is what starry-night does too (some small differences in markup, but essentially the same)!

PrettyLights is responsible for taking the flag markdown, looking it up in languages.yml from github/linguist to figure out that that means markdown, taking a corresponding grammar (in this case atom/language-gfm), doing some GPL magic in C, and turning it into spans with classes.

GitHub is using PrettyLights since December 2014, when it replaced Pygments. They wanted to open source it, but were unable due to licensing issues. Recently (Feb 2019?), GitHub has slowly started to move towards TreeLights, which is based on TreeSitter, and also closed source. If TreeLights includes a language (currently: CSS, CodeQL, EJS, Elixir, Go, HTML, JS, PHP, Python, Ruby, TS), that’ll be used, for everything else PrettyLights is used.

starry-night does what PrettyLights does, not what TreeLights does. I’m hopeful that that will be open sourced in the future and we can mimic both.


Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install with npm:

npm install @wooorm/starry-night

In Deno with esm.sh:

import {createStarryNight, common} from 'https://esm.sh/@wooorm/starry-night@1'

In browsers with esm.sh:

<script type="module">
  import {createStarryNight, common} from 'https://esm.sh/@wooorm/starry-night@1?bundle'
</script>

To get the CSS in browsers, do (see CSS for more info):

<!-- This supports light and dark mode automatically. -->
<link rel="stylesheet" href="https://esm.sh/@wooorm/starry-night@1/style/both.css">

Use

import {createStarryNight, common} from '@wooorm/starry-night'

const starryNight = await createStarryNight(common)

const scope = starryNight.flagToScope('markdown')
const tree = starryNight.highlight('# hi', scope)

console.log(tree)

Yields:

{
  type: 'root',
  children: [
    {
      type: 'element',
      tagName: 'span',
      properties: {className: ['pl-mh']},
      children: [{type: 'text', value: '# hi'}]
    }
  ]
}

API

This package exports the identifiers createStarryNight, common, and all. There is no default export.

createStarryNight(grammars)

Create a StarryNight that can highlight things based on the given grammars. This is async to facilitate async loading and registering, which is currently only used for WASM.

Parameters
  • grammars (Array<Grammar>) — grammars to support
Returns

Promise that resolves to an instance which highlights based on the bound grammars (Promise<StarryNight>).

starryNight.highlight(value, scope)

Highlight value (code) as scope (a TextMate scope).

Parameters
  • value (string) — code to highlight
  • scope (string) — registered grammar scope to highlight as (such as 'source.gfm')
Returns

Node representing highlighted code (Root).

Example
import {createStarryNight} from '@wooorm/starry-night'
import sourceCss from '@wooorm/starry-night/lang/source.css.js'

const starryNight = await createStarryNight([sourceCss])

console.log(starryNight.highlight('em { color: red }', 'source.css'))

Yields:

{
  type: 'root',
  children: [
    {type: 'element', tagName: 'span', properties: [Object], children: [Array]},
    {type: 'text', value: ' { '},
    // …
    {type: 'element', tagName: 'span', properties: [Object], children: [Array]},
    {type: 'text', value: ' }'}
  ]
}

starryNight.flagToScope(flag)

Get the grammar scope (such as source.gfm) associated with a grammar name (such as markdown or pandoc) or grammar extension (such as .md or .rmd). Note that grammars can use the same extensions, in which case GitHub chooses the first. Notably, .md is registered by a lisp-like language instead of markdown. 🤷‍♂️

Parameters
  • flag (string) — grammar name (such as 'markdown' or 'pandoc') or grammar extension (such as '.md' or '.rmd')
Returns

Grammar scope, such as 'source.gfm' (string?)

Example
import {createStarryNight, common} from '@wooorm/starry-night'

const starryNight = await createStarryNight(common)

console.log(starryNight.flagToScope('pandoc')) // `'source.gfm'`
console.log(starryNight.flagToScope('workbook')) // `'source.gfm'`
console.log(starryNight.flagToScope('.workbook')) // `'source.gfm'`
console.log(starryNight.flagToScope('whatever')) // `undefined`

starryNight.scopes()

List all registered scopes.

Returns

List of grammar scopes, such as 'source.gfm' (Array<string>).

Example
import {createStarryNight, common} from '@wooorm/starry-night'

const starryNight = await createStarryNight(common)

console.log(starryNight.scopes())

Yields:

[
  'source.c',
  'source.c++',
  // …
  'text.xml',
  'text.xml.svg'
]

starryNight.register(grammars)

Add more grammars.

Parameters
  • grammars (Array<Grammar>) — grammars to support
Returns

A promise resolving to nothing (Promise<undefined>).

Example
import {toHtml} from 'hast-util-to-html'
import {createStarryNight} from '@wooorm/starry-night'
import sourceGfm from '@wooorm/starry-night/lang/source.gfm.js'
import sourceCss from '@wooorm/starry-night/lang/source.css.js'

const markdown = '```css\nem { color: red }\n```'

const starryNight = await createStarryNight([sourceGfm])

console.log(toHtml(starryNight.highlight(markdown, 'source.gfm')))

await starryNight.register([sourceCss])

console.log(toHtml(starryNight.highlight(markdown, 'source.gfm')))

Yields:

<span class="pl-c1">```css</span>
em { color: red }
<span class="pl-c1">```</span>
<span class="pl-c1">```css</span>
<span class="pl-ent">em</span> { <span class="pl-c1">color</span>: <span class="pl-c1">red</span> }
<span class="pl-c1">```</span>

Examples

Example: serializing hast as html

hast trees as returned by starry-night can be serialized with hast-util-to-html:

import {toHtml} from 'hast-util-to-html'
import {starryNight, common} from '@wooorm/starry-night'

const starryNight = await createStarryNight(common)

const tree = starryNight.highlight('"use strict";', 'source.js')

console.log(toHtml(tree))

Yields:

<span class="pl-s"><span class="pl-pds">"</span>use strict<span class="pl-pds">"</span></span>;

Example: turning hast into react nodes

hast trees as returned by starry-night can be turned into React (or Preact, Vue, &c) with hast-to-hyperscript:

import {createStarryNight, common} from '@wooorm/starry-night'
import {toH} from 'hast-to-hyperscript'
import React from 'react'

const starryNight = await createStarryNight(common)

const tree = starryNight.highlight('"use strict";', 'source.js')
const reactNode = toH(React.createElement, tree)

console.log(reactNode)

Yields:

{
  '$$typeof': Symbol(react.element),
  type: 'div',
  key: 'h-1',
  ref: null,
  props: {children: [[Object], ';']},
  _owner: null,
  _store: {}
}

Example: integrate with unified, remark, and rehype

This example shows how to combine starry-night with unified: using remark to parse the markdown and transforming it to HTML with rehype. If we have a markdown file example.md:

# Hello

…world!

```js
console.log('it works!')
```

…and a plugin rehype-starry-night.js:

/**
 * @typedef {import('hast').Root} Root
 * @typedef {import('hast').ElementContent} ElementContent
 * @typedef {import('@wooorm/starry-night').Grammar} Grammar
 *
 * @typedef Options
 *   Configuration (optional)
 * @property {Array<Grammar>} [grammars]
 *   Grammars to support (defaults: `common`).
 */

import {createStarryNight, common} from '@wooorm/starry-night'
import {visit} from 'unist-util-visit'
import {toString} from 'hast-util-to-string'

/**
 * Plugin to highlight code with `starry-night`.
 *
 * @type {import('unified').Plugin<[Options?], Root>}
 */
export default function rehypeStarryNight(options = {}) {
  const grammars = options.grammars || common
  const starryNightPromise = createStarryNight(grammars)
  const prefix = 'language-'

  return async function (tree) {
    const starryNight = await starryNightPromise

    visit(tree, 'element', function (node, index, parent) {
      if (!parent || index === null || node.tagName !== 'pre') {
        return
      }

      const head = node.children[0]

      if (
        !head ||
        head.type !== 'element' ||
        head.tagName !== 'code' ||
        !head.properties
      ) {
        return
      }

      const classes = head.properties.className

      if (!Array.isArray(classes)) return

      const language = classes.find(
        (d) => typeof d === 'string' && d.startsWith(prefix)
      )

      if (typeof language !== 'string') return

      const scope = starryNight.flagToScope(language.slice(prefix.length))

      // Maybe warn?
      if (!scope) return

      const fragment = starryNight.highlight(toString(head), scope)
      const children = /** @type {Array<ElementContent>} */ (fragment.children)

      parent.children.splice(index, 1, {
        type: 'element',
        tagName: 'div',
        properties: {
          className: [
            'highlight',
            'highlight-' + scope.replace(/^source\./, '').replace(/\./g, '-')
          ]
        },
        children: [{type: 'element', tagName: 'pre', properties: {}, children}]
      })
    })
  }
}

…and finally a module example.js:

import fs from 'node:fs/promises'
import {unified} from 'unified'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import rehypeStringify from 'rehype-stringify'
import rehypeStarryNight from './rehype-starry-night.js'

const file = await unified()
  .use(remarkParse)
  .use(remarkRehype)
  .use(rehypeStarryNight)
  .use(rehypeStringify)
  .process(await fs.readFile('example.md'))

console.log(String(file))

Now running node example.js yields:

<h1>Hello</h1>
<p>…world!</p>
<div class="highlight highlight-js"><pre><span class="pl-en">console</span>.<span class="pl-c1">log</span>(<span class="pl-s"><span class="pl-pds">'</span>it works!<span class="pl-pds">'</span></span>)
</pre></div>

Example: integrating with markdown-it

This example shows how to combine starry-night with markdown-it. If we have a markdown file example.md:

# Hello

…world!

```js
console.log('it works!')
```

…and a module example.js:

import fs from 'node:fs/promises'
import {createStarryNight, common} from '@wooorm/starry-night'
import {toHtml} from 'hast-util-to-html'
import markdownIt from 'markdown-it'

const file = await fs.readFile('example.md')
const starryNight = await createStarryNight(common)

const markdownItInstance = markdownIt({
  highlight(value, lang) {
    const scope = starryNight.flagToScope(lang)

    return toHtml({
      type: 'element',
      tagName: 'pre',
      properties: {
        className: scope
          ? [
              'highlight',
              'highlight-' + scope.replace(/^source\./, '').replace(/\./g, '-')
            ]
          : undefined
      },
      children: scope
        ? starryNight.highlight(value, scope).children
        : [{type: 'text', value}]
    })
  }
})

const html = markdownItInstance.render(String(file))

console.log(html)

Now running node example.js yields:

<h1>Hello</h1>
<p>…world!</p>
<pre class="highlight highlight-js"><span class="pl-en">console</span>.<span class="pl-c1">log</span>(<span class="pl-s"><span class="pl-pds">'</span>it works!<span class="pl-pds">'</span></span>)
</pre>

Syntax tree

The generated hast starts with a root node, that represents the fragment. It contains up to three levels of <span> elements, each with a single class. All these levels can contain text nodes with the actual code. Interestingly, TextMate grammars work per line, so all line endings are in the root directly, meaning that creating a gutter to display line numbers can be generated rather naïvely by only looking through the root node.

CSS

starry-night does not inject CSS for the syntax highlighted code (because well, starry-night doesn’t have to be turned into HTML and might not run in a browser!). If you are in a browser, you can use the packaged themes, or get creative with CSS! 💅

All themes accept CSS variables (custom properties). With the theme core.css, you have to define your own properties. All other themes define the colors on :root. Themes either have a dark or light suffix, or none, in which case they automatically switch colors based on a @media (prefers-color-scheme: dark). All themes are tiny (under 1 kB). The shipped themes are as follows:

name Includes light scheme Includes dark scheme
core.css
light.css
dark.css
both.css
colorblind-light.css
colorblind-dark.css
colorblind.css
dimmed-dark.css
dimmed.css
high-contrast-light.css
high-contrast-dark.css
high-contrast.css
tritanopia-light.css
tritanopia-dark.css
tritanopia.css

Languages

Checked grammars are included in common. Everything is available through all. You can add more grammars as you please.

Each grammar has several associated names and extensions. See source files for which are known and use flagToScope to turn them into scopes.

All licenses are permissive and made available in notice. Changes should go to upstream repos and languages.yml in github/linguist.

Types

This package is fully typed with TypeScript. It exports additional Grammar and Root types that model their respective interfaces.

Compatibility

This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18.0+. It also works in Deno and modern browsers.

You can pass your own TextMate grammars, provided that they work with vscode-textmate, and that they have the added fields scopeName, names, and extensions (see types for the definitions and the grammars in lang/ for examples).

Security

This package is safe.

Related

  • lowlight — similar but based on highlight.js
  • refractor — similar but based on Prism

Contribute

Yes please! See How to Contribute to Open Source.

License

The grammars included in this package are covered by their repositories’ respective licenses, which are permissive (apache-2.0, mit, etc), and made available in notice.

All other files MIT © Titus Wormer


Comments
  • Rehype/Remark Plugin?

    Rehype/Remark Plugin?

    This looks great! I'd love to use it with a static site generator. Do you have any plans for a Remark/Rehype plugin wrapping this or would that be fair game for the community?

    opened by eligundry 7
  • Svelte grammar having issues with parsing if script tag declares language as  `lang=

    Svelte grammar having issues with parsing if script tag declares language as `lang="ts"`

    To declare a <script> tag content as typescript one has to add the following attribute lang="ts" Currently the regex of the umanghome svelte parser does not consider this in their regex, which can break the syntax highlighting of a svelte file.

    I created a PR on the upstream repo to fix this, and then eventually pull it into this repo. https://github.com/umanghome/svelte-atom/pull/1

    Current broken file

    With PR applied

    opened by sebastinez 6
  • Highlight differences with GitHub.com

    Highlight differences with GitHub.com

    I found out that in JavaScript and TypeScript the name of a const is assigned a span with a pl-c1 class which doesn't match with what GitHub does in their highlighting, where they mark it as a pl-s1.

    Current starry-night with source.js.js grammar

    Bildschirm­foto 2022-12-13 um 07 27 28

    Current GitHub rendering of the same file

    Bildschirm­foto 2022-12-13 um 07 27 51

    It seems that the name of the pattern is constant.other at least in Javascript. I'm still trying to get into the codebase but am I right that the mapping between grammar pattern names and css classes are done here? https://github.com/wooorm/starry-night/blob/main/lib/theme.js

    In that case I would propose to add, to /lib/theme.js

      "constant.other": "pl-s1"
    

    Also there is some different behaviour in method calls e.g. string.slice() slice is also assigned a pl-c1 instead of pl-en.

    opened by sebastinez 6
  • [feature] allow wrapping lines in spans

    [feature] allow wrapping lines in spans

    it would be great if individual lines could be wrapped in <span>s, to make adding line highlights and line numbers easier (although i'm not sure if this is intentionally not done to stay close to what prettylights does?)

    opened by stefanprobst 3
  • Is this package still private on npm?

    Is this package still private on npm?

    Running the install instructions:

    npm install starry-night
    

    Results in a 404 error from npm.

    Have you published the package yet? Or is the package still private?

    opened by macdonst 3
  • Rust grammar is outdated and not used by linguist

    Rust grammar is outdated and not used by linguist

    The current rust grammar used by starry-night is https://github.com/zargony/atom-language-rust, unfortunately this repo is no longer maintained and not even linguist uses or is interested in changing this, since GitHub moved to tree-sitter for Rust see https://github.com/github/linguist/issues/5965

    So I would propose that we look into https://github.com/dustypomerleau/rust-syntax which seems like a up to date and more importantly maintained grammar.

    opened by sebastinez 2
  • The `pl-c1` class is applied too greedy.

    The `pl-c1` class is applied too greedy.

    I'm seeing that the pl-c1 class is applied in a lot of places, e.g. const variable names, methods calls, numbers, some primitives like undefined, null or this.

    I would classify this as a bug, since there is no way to uncolor a const variable name, like the majority of IDEs or code hosting sites do.

    const likeThisExample = undefined;
    

    Is there any solution to this? Maybe a change in the grammar, or a change to the lib/theme.js or something else?

    References Bildschirm­foto 2022-12-15 um 11 55 33 Bildschirm­foto 2022-12-15 um 11 55 27 Bildschirm­foto 2022-12-15 um 11 55 18

    opened by sebastinez 2
  • `onig.wasm` missing from Next.js standalone build

    `onig.wasm` missing from Next.js standalone build

    I use Next.js for https://tigyog.app, using its standalone build feature. When installing starry-night, all worked well, until I got errors in production saying that onig.wasm was missing. This is due to Next.js's dependency tracing not detecting this dynamic dependency. I was able to work around this ugly issue by adding this to pages/index.ts:

    export const config = {
      unstable_includeFiles: ['node_modules/vscode-oniguruma/release/onig.wasm'],
    };
    

    I don't know whether to consider this a bug in starry-night or in Next.js, but I expect it will be a common and mysterious error when using starry-night with file tracing, so I'm reporting it here for you. I've also reported the problem here: https://github.com/vercel/next.js/issues/43973

    opened by jameshfisher 2
  • Rewrite in Typescript

    Rewrite in Typescript

    I see that you have everything very nicely typed out with JSDoc, but I still wanted to ask if you would be interested in a migration to TypeScript? Or do you prefer the flexibility of JSDoc over TypeScript?

    opened by sebastinez 1
  • How to make it work with multiline text?

    How to make it work with multiline text?

    This is my code for test:

    import {toHtml} from 'hast-util-to-html'
    import {createStarryNight, common} from '@wooorm/starry-night'
    import {readFileSync, writeFileSync} from "fs"
    
    const starryNight = await createStarryNight(common)
    
    const tree = starryNight.highlight(readFileSync("index.js").toString(), 'source.js')
    
    const html = toHtml(tree)
    
    const out = `
    <title>StarryNight Playground</title>
    <link rel="stylesheet" href="https://esm.sh/@wooorm/starry-night@1/style/both.css">
    ${html}`
    
    writeFileSync('index.html', out.trim())
    
    console.log('done highlighting index.js')
    

    And the output index.html looks like this: image

    All the newlines and tabs are disappeared, so what should I do to make it work?

    Thank you!

    opened by LanfordCai 1
  • update to vscode-textmate 7.0.3 will cause error

    update to vscode-textmate 7.0.3 will cause error

    in vscode-textmate 7.0.1, starry-night work well but update to vscode-textmate 7.0.3, it will cause an error

    because it change the type of private variable, now currentRegistry._syncRegistry._grammars is a map object

    so this line https://github.com/wooorm/starry-night/blob/bed5d46743f91fe20191a223d63e6bc598c10802/lib/index.js#L151 will cause an error, it will return undefined

    solution:

    -const grammar = currentRegistry._syncRegistry._grammars[scope]
    +const grammar = currentRegistry._syncRegistry._grammars.get(scope)
    

    but it is not compatible with 7.0.1

    opened by bbsweb 1
  • Support locally hosted wasm injection

    Support locally hosted wasm injection

    Hey @wooorm,

    Thank you very much for this library, looks and feels really nice. 👍 Wdyt about allowing to host the Oniguruma WASM bin locally, instead of fetching it from the esm.sh CDN. https://github.com/wooorm/starry-night/blob/c73aac7b8bff41ada86747f668dd932a791b851b/lib/index.js#L211

    I'm thinking either, it could be passed as part of an optional options object into createStarryNight(grammars, options) Or a new function, e.g. configure that takes a options object, could also be used to pass in grammars 🤔

    If you agree, I will gladly create a PR

    opened by sebastinez 8
Releases(1.4.2)
Owner
Titus
🐧 Making it easier for developers to develop · core team @unifiedjs · full-time OSS · syntax trees, markdown, markup, natural language 🐧
Titus
A refined tool for exploring open-source projects on GitHub with a file tree, rich Markdown and image previews, multi-pane multi-tab layouts and first-class support for Ink syntax highlighting.

Ink codebase browser, "Kin" ?? The Ink codebase browser is a tool to explore open-source code on GitHub, especially my side projects written in the In

Linus Lee 20 Oct 30, 2022
Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.

Crayon Syntax Highlighter Supports multiple languages, themes, fonts, highlighting from a URL, local file or post text. Written in PHP and jQuery. Cra

Aram Kocharyan 1.1k Nov 26, 2022
A Bower wrapper for @bartaz modification to the jQuery Term Highlighting plugin.

jQuery.Highlight.js Text highlighting plugin for jQuery. Original code and documentation. Install API Examples Attribution Install How to use this plu

Ilya Radchenko 46 Dec 30, 2022
Highlighting the best apps and builders on the Farcaster community.

FarApps Highlighting the best apps and builders on the Farcaster community. Getting Started This project uses Next.js. Install dependencies and run th

null 15 Dec 30, 2022
A lib for text highlighting by using Canvas.

canvas-highlighter 基于 canvas 实现的文本划词高亮,与文本展示的结构完全解耦,不改变文本内容的 DOM 结构。 Installation npm install canvas-highlighter Usage 最简单的实现文本划词直接高亮 import CanvasHig

null 72 Dec 24, 2022
A tiny, plugin extendable JavaScript utility library with a JQuery-like syntax.

Tiny Friggin' Utility Zapper What is it? A tiny ~7kb extendable JavaScript utility library with a JQuery like syntax for getting work done fast! If yo

Bret 4 Jun 25, 2022
A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebWorker like neither of those.

Amuchina A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebW

Fabio Spampinato 9 Sep 17, 2022
Small library to create classes without using class syntax.

Clazz.js Small library to create classes without using class syntax. Compatibility For internet explorer 11 or higher. Example <script src="Clazz.js">

Emanuel R. Vásquez 1 Dec 25, 2021
Starting template for building a Remix site with CloudFlare Workers (ES Modules Syntax)

Starting template for building a Remix site with CloudFlare Workers (ES Modules Syntax)

null 12 May 20, 2022
Combine type and value imports using Typescript 4.5 type modifier syntax

type-import-codemod Combines your type and value imports together into a single statement, using Typescript 4.5's type modifier syntax. Before: import

Ian VanSchooten 4 Sep 29, 2022
Alfred Workflow for selecting citations in Pandoc Syntax from a BibTeX File.

Supercharged Citation Picker A citation picker for academics that write in markdown. Using Alfred, this citation picker inserts Pandoc citations from

pseudometa 69 Dec 29, 2022
A small javascript DOM manipulation library based on Jquery's syntax. Acts as a small utility library with the most common functions.

Quantdom JS Quantdom is a very small (about 600 bytes when ran through terser & gzipped) dom danipulation library that uuses a Jquery like syntax and

Sean McQuaid 7 Aug 16, 2022
Syntax Highlighter bot for Telegram.

??️ Syntax Highlighter Bot Kind of a copy; highly inspired from Piterden/syntax-highlighter-bot - Telegram Bot here Minimal syntax highlighting bot fo

Dunkan 18 Nov 11, 2022
An experimental syntax highlighter web app bot based on Telegram's WebApp update.

Syntax Highlighter WebApp Inspired by zubiden/tg-web-bot-demo. Try the demo bot running here: @syntaxyybot Recently Telegram released a big update for

Dunkan 12 Nov 8, 2022
✏️ Super lightweight JSX syntax highlighter, around 1KB after minified and gzipped

Sugar High Introduction Super lightweight JSX syntax highlighter, around 1KB after minified and gzipped Usage npm install --save sugar-high import { h

Jiachi Liu 67 Dec 8, 2022
Markdoc is a Markdown-based syntax and toolchain for creating custom documentation sites and experiences.

A powerful, flexible, Markdown-based authoring framework. Markdoc is a Markdown-based syntax and toolchain for creating custom documentation sites and

Markdoc 5.8k Jan 2, 2023
A simple Node.js package that helps you not to look up JavaScript promise syntax every time you use it.

A simple Node.js package that helps you not to look up JavaScript promise syntax every time you use it. Simple: Provides abstraction of the promise sy

Saad Irfan ⚡️ 9 Oct 8, 2022
A remake of the previous project (awsm-books) using proper ES6 syntax.

Awesome-Books-ES6 A remake of the previous project (awsm-books) using proper ES6 syntax. Built With: HTML CSS SCSS JavaScript Live Demo: Live Demo Get

Gabriel Fonseca 4 Jun 23, 2022