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.
raml-typesystem
Advanced tools
[![Build Status](https://travis-ci.org/raml-org/typesystem-ts.svg?branch=master)](https://travis-ci.org/raml-org/typesystem-ts)
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 typesystem-ts 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 8,723 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.
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.