Socket
Socket
Sign inDemoInstall

deckardcain

Package Overview
Dependencies
0
Maintainers
6
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    deckardcain

Identifies (media) type of API description files


Version published
Weekly downloads
2.3K
increased by4.43%
Maintainers
6
Install size
9.99 kB
Created
Weekly downloads
 

Readme

Source

Deckard Cain

Build Status

"As a token of my gratitude, I will identify items for you at no charge."

Introduction

Deckard Cain library identifies (media) type of API description files.

Supported API description formats

  • API Blueprint - text/vnd.apiblueprint
  • Legacy Apiary Blueprint (predecessor of API Blueprint) - text/vnd.legacyblueprint
  • Swagger - application/swagger+json (according to swagger-api/swagger-spec#110) and application/swagger+yaml
  • API Description Namespace - application/vnd.refract.api-description+json and application/vnd.refract.api-description+yaml

Install

npm install deckardcain

Usage

import {identify} from 'deckardcain';

identify(`
HOST: http://example.com

--- API Name ---

All Messages
GET /messages
< 200
`) // 'text/vnd.legacyblueprint'

identify(`
FORMAT: 1A
HOST: http://example.com

# API Name

## Group Messages

### All Messages [/messages]

#### Read [GET]

+ Response 200 (text/plain)
`) // 'text/vnd.apiblueprint'

Contribute

Please mind the library is written in ECMAScript 6.

Installation

git clone https://github.com/apiaryio/deckardcain
cd deckardcain
npm install

Testing

npm test

See also the .travis.yml file.

Workflow

Source code is located in the ./src folder and gets automatically transpiled into ./lib folder when npm install or npm publish is invoked. However, should you need to transpile it manually, use npm run compile.

Name

Deckard Cain library pays tribute to a fictional character from Diablo video game series. In Diablo II, Deckard Cain provides his wisdom and identifies items for free after being rescued by the player.

Keywords

FAQs

Last updated on 24 Jun 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc