swc-registry
TypeScript icon, indicating that this package has built-in type declarations

2.0.11 • Public • Published

SWC-registry-javascript

CircleCI npm version MIT license

Javascript library for accessing an SWC-registry entries.

Installation

  • Global installation:
    npm install -g swc-registry
  • Installation as dependency:
    npm install --save swc-registry

Usage

import { SWC } from 'swc-registry';

const swc = new SWC();
const data = swc.getEntryData('SWC-100');

if (data) {
    console.log(data.Title, data.Relationships, data.Description, data.Remediation);
} else {
    throw new Error('Invalid SWC id');
}

CLI mode

Library provides swc-cli executable for command-line interface. Usage examples:

  • Print manual:
    swc-cli --help
  • Download latest SWC-registry JSON snapshot:
    swc-cli --update
  • View markdown of specific SWC entry:
    swc-cli --markdown SWC-100

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i swc-registry

Weekly Downloads

2

Version

2.0.11

License

MIT

Unpacked Size

95.3 kB

Total Files

7

Last publish

Collaborators

  • swcregistry