New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

deckardcain

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deckardcain - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

16

lib/deckardcain.js

@@ -9,9 +9,11 @@ 'use strict';

exports.API_BLUEPRINT_HEADER = API_BLUEPRINT_HEADER;
var API_BLUEPRINT_RESPONSE = /\+\s+(?:response|request)\s+\d{3}/i;
var API_BLUEPRINT_LISTITEM = /[-\*\+]\s+(response|request|attributes?)/i;
exports.API_BLUEPRINT_LISTITEM = API_BLUEPRINT_LISTITEM;
var API_BLUEPRINT_DATA = /#+\s+data structures?\s*\n/i;
exports.API_BLUEPRINT_RESPONSE = API_BLUEPRINT_RESPONSE;
exports.API_BLUEPRINT_DATA = API_BLUEPRINT_DATA;
var LEGACY_BLUEPRINT_TITLE = /[-]{3}(?=( [^\n\r]+ | )[-]{3}([\n\r]{1,2}|[.]{0}))/i;
exports.LEGACY_BLUEPRINT_TITLE = LEGACY_BLUEPRINT_TITLE;
var SWAGGER_JSON = /^[\uFEFF]?{[\s\S]*["']swagger["']: ?["']\d\.\d["'],?/i;
var SWAGGER_JSON = /^[\uFEFF]?{[\s\S]*["']swagger["']\s*:\s*["']\d\.\d["'],?/i;
exports.SWAGGER_JSON = SWAGGER_JSON;

@@ -21,7 +23,7 @@ var SWAGGER_YAML = /(?:^|\n)\s*swagger: ["']\d\.\d["']\n/i;

exports.SWAGGER_YAML = SWAGGER_YAML;
var REFRACT_API_DESCRIPTION_ELEMENT_JSON = /[\uFEFF]?\n?\s*["']element["']: ?["']category["']/i;
var REFRACT_API_DESCRIPTION_ELEMENT_JSON = /[\uFEFF]?\n?\s*["']element["']\s*:\s*["']category["']/i;
exports.REFRACT_API_DESCRIPTION_ELEMENT_JSON = REFRACT_API_DESCRIPTION_ELEMENT_JSON;
var REFRACT_API_DESCRIPTION_CLASS_JSON = /"meta"\s*:\s*\{\s*"classes"\:\s*\[\s*"api"\s*\]/i;
var REFRACT_API_DESCRIPTION_CLASS_JSON = /"meta"\s*:\s*\{\s*"classes"\s*:\s*\[\s*"api"\s*\]/i;
exports.REFRACT_API_DESCRIPTION_CLASS_JSON = REFRACT_API_DESCRIPTION_CLASS_JSON;
var REFRACT_PARSE_RESULT_ELEMENT_JSON = /[\uFEFF]?\n?\s*["']element["']: ?["']parseResult["']/i;
var REFRACT_PARSE_RESULT_ELEMENT_JSON = /[\uFEFF]?\n?\s*["']element["']\s*:\s*["']parseResult["']/i;

@@ -76,3 +78,3 @@ exports.REFRACT_PARSE_RESULT_ELEMENT_JSON = REFRACT_PARSE_RESULT_ELEMENT_JSON;

if (source.match(API_BLUEPRINT_RESPONSE)) {
if (source.match(API_BLUEPRINT_LISTITEM) || source.match(API_BLUEPRINT_DATA)) {
// Didn't find '--- Sample Title ---' and at the same time

@@ -79,0 +81,0 @@ // there is something like '+ Response 200' in the document, which is

{
"name": "deckardcain",
"version": "0.3.4",
"version": "0.3.5",
"description": "Identifies (media) type of API description files",

@@ -5,0 +5,0 @@ "main": "lib/deckardcain",

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