Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
apiary-blueprint-parser
Advanced tools
A JavaScript parser of Apiary API blueprints.
The Apiary Blueprint Parser is currently frozen. There is no future development planned.
Please check the new API Blueprint which supersedes the Apiary Blueprint and is completely open-sourced including its parser, tools and bindings.
$ npm install apiary-blueprint-parser
Do not install the parser globally (using the -g
option), otherwise you won’t be able to use the API.
Download the latest browser version of the parser.
In Node.js, require the module:
var ApiaryBlueprintParser = require("apiary-blueprint-parser");
In browser, include the browser version of the parser in your web page or
application using the <script>
tag. The parser will be available in the
ApiaryBlueprintParser
global object.
To parse an API blueprint, just call the parse
method and pass the blueprint
as a parameter. The method will return an object representing the parsed
blueprint or throw an exception if the input is invalid:
var blueprint = ApiaryBlueprintParser.parse([
"Root resource",
"GET /",
"< 200"
].join("\n"));
var resource = blueprint.sections[0].resources[0];
console.log(resource.description) // prints "Root resource"
console.log(resource.method) // prints "GET"
console.log(resource.url) // prints "/"
console.log(resource.response.status) // prints "200"
See the src/ast.coffee
file to get an idea about returned objects and their
capabilities.
The exception thrown in case of error will contain offset
, line
, column
,
expected
, found
and message
properties with more details about the error.
The parser should run well in the following environments:
The parser should also work in IE 8, but this is not fully tested because the test suite runs correctly only in IE 9+.
FAQs
Apiary blueprint parser
The npm package apiary-blueprint-parser receives a total of 3 weekly downloads. As such, apiary-blueprint-parser popularity was classified as not popular.
We found that apiary-blueprint-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.