New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@nitric/snippy

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nitric/snippy

Nitric code snippet parser client

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
5
Created
Source

@nitric/snippy

Tests codecov Version Downloads/week

The Code snippet parser.

The @nitric/snippy package was created to find and parse snippets into readable data that can be consumed by any application.

This package was used to create all code snippets used in the nitric documentation.

Features

  • Any langauge. Parses snippets in any programming language.
  • Universal. Works in all modern browsers and Node.js.
  • Typed. Has entensive TypeScript declarations.

Usage

Node 12+

Install with npm install @nitric/snippy, or yarn add @nitric/snippy

Get a snippet

const { snippy } = require('@nitric/snippy');

const result = await snippy().get(
  'nitrictech/node-sdk/examples/documents/get.ts'
);

Get a snippet with Auth

const { snippy } = require('@nitric/snippy');

const result = await snippy({
  auth: process.env.GITHUB_AUTH_TOKEN,
}).get('nitrictech/node-sdk/examples/documents/get.ts');
const { snippy } = require('@nitric/snippy');

const result = await snippy({
  repos: [
    {
      url: 'nitrictech/node-sdk',
      exts: ['ts', 'js'],
    },
    {
      url: 'nitrictech/go-sdk',
      exts: ['go'],
    },
    {
      url: 'nitrictech/python-sdk',
      exts: ['py'],
    },
  ],
}).search();

Search with auth

Install with npm install @nitric/snippy, or yarn add @nitric/snippy

import { snippy } from '@nitric/snippy';

const result = await snippy({
  auth: process.env.GITHUB_AUTH_TOKEN,
  repos: [
    {
      url: 'nitrictech/node-sdk',
      exts: ['ts', 'js'],
    },
    {
      url: 'nitrictech/go-sdk',
      exts: ['go'],
    },
    {
      url: 'nitrictech/python-sdk',
      exts: ['py'],
    },
  ],
}).search();

FAQs

Package last updated on 08 Nov 2021

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