
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
raml-parser
Advanced tools
A RAML parser based on PyYAML written in CoffeScript and available for use as NodeJs module or in-browser.
This project contains a RAML parser capable (at this moment) to parser v0.8 version of the RAML specification. The parser is written in CoffeeScript and its capable of running inside NodeJS as well as in-browser.
The RAML parser is versioned in the following manner:
x.y.z
in which x.y denotes the version of the RAML specification and z is the version of the parser.
So 0.1.2 is the 2nd revision of the parser for the 0.1 version of the RAML specification.
Loading a RAML file is as easy as follows:
var raml = require('raml-parser');
raml.loadFile('myAPI.raml').then( function(data) {
console.log(data);
}, function(error) {
console.log('Error parsing: ' + error);
});
you can also alternatively load from a string containing the api definition:
var raml = require('raml-parser');
var definition = [
'---',
'title: MyApi',
'baseUri: http://myapi.com',
'/:',
' name: Root'
].join('\n');
raml.load(definition).then( function(data) {
console.log(data);
}, function(error) {
console.log('Error parsing: ' + error);
});
Generating an AST from a RAML file is as easy as follows:
var raml = require('raml-parser');
var myAPI;
raml.composeFile('myAPI.raml').then( function(rootNode) {
console.log('Root Node: ' + rootNode)
}, function(error) {
console.log('Error parsing: ' + error);
});
you can also alternatively generate an AST from a string containing the api definition:
var raml = require('raml-parser');
var definition = [
'---',
'title: MyApi',
'baseUri: http://myapi.com',
'/:',
' name: Root'
].join('\n');
raml.compose(definition).then( function(rootNode) {
console.log('Root Node: ' + rootNode)
}, function(error) {
console.log('Error parsing: ' + error);
});
Using the RAML parser from inside the browser requires the user to actually include the RAML javascript file in a script tag as follows:
<script src="raml-parser.min.js"></script>
from there on the usage is pretty much the same as NodeJS, the script defines a RAML.Parser object globally which can be used as follows:
RAML.Parser.loadFile('http://localhost:9001/myAPI.raml').then( function(data) {
console.log(data)
}, function(error) {
console.log('Error parsing: ' + error);
});
Notice that the in-browser version can fetch remote API definitions via XHR.
FAQs
A RAML parser based on PyYAML written in CoffeScript and available for use as NodeJs module or in-browser.
The npm package raml-parser receives a total of 37,344 weekly downloads. As such, raml-parser popularity was classified as popular.
We found that raml-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.