Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
raml-typesystem
Advanced tools
[![Build Status](https://travis-ci.org/raml-org/raml-typesystem.svg?branch=master)](https://travis-ci.org/raml-org/raml-typesystem) [![Greenkeeper badge](https://badges.greenkeeper.io/raml-org/raml-typesystem.svg)](https://greenkeeper.io/)
This module contains a lightweight implementation of the type system that was introduced with RAML 1.0.
It allows you to to parse, validate , modify RAML types, as well as store them back to JSON.
npm install raml-typesystem --save
Parsing and validating a single type:
import ts = require("raml-typesystem")
var personType = ts.loadType( {
type: "string[]",
minItems:3,
maxItems:2
})
var isValid = personType.validateType();
Parsing and validating a types
collection:
import ts = require("raml-typesystem")
var typeCollection = ts.loadTypeCollection({
types: {
Person: {
type: "object",
properties:{
kind: "string"
}
},
Man: {
type: "Person",
discriminator: "kind"
}
}
})
var isValid = typeCollection.getType("Person").validateType()
Validating object against type:
import ts = require("raml-typesystem")
var typeCollection = ts.loadTypeCollection({
types: {
Person: {
type: "object",
properties:{
kind: "string"
}
},
Man: {
type: "Person",
discriminator: "kind"
}
}
})
var isValid = typeCollection.getType("Person").validate({dd: true})
The raml-typesystem repo is an open source project and any contribution is always welcome. Please follow these simple steps when contributing to this project:
A big thank you goes out to everyone who helped with the project, the contributors and everyone who took the time to report issues and give feedback.
You can also directly get in touch with us. Simply send us an email to: info@raml.org
FAQs
[![Build Status](https://travis-ci.org/raml-org/raml-typesystem.svg?branch=master)](https://travis-ci.org/raml-org/raml-typesystem) [![Greenkeeper badge](https://badges.greenkeeper.io/raml-org/raml-typesystem.svg)](https://greenkeeper.io/)
The npm package raml-typesystem receives a total of 10,625 weekly downloads. As such, raml-typesystem popularity was classified as popular.
We found that raml-typesystem demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.