Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ink-highlight

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ink-highlight

Highlight component for Ink

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

GitHub Action npm version License: MIT code style: prettier PRs Welcome

ink-highlight

Highlight component for Ink. Uses ink-highlight for the code syntax highlight on your cli application.

Installation

The plugin can then be installed using npm:

NPM

# yarn
yarn add ink-highlight
# or npm
npm install ink-highlight

Usage

import React from 'react';
import { render } from 'ink';
import { Highlight } from 'ink-highlight';

const code = `SELECT
  \`id\`,
  \`name\`
FROM \`users\`
WHERE
  \`id\` = 1;
`;

render(<Highlight code={code} language="sql" />);
result

API

Highlight Component

  • Props
type Props = {
  code: string;
  language?: string;
};

License

This software is released under the MIT License, see LICENSE.

Keywords

FAQs

Package last updated on 06 Apr 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc