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.
@kmudrick/json-schema-io-ts-codecs
Advanced tools
Codecs to parse JSON Schema Documents using io-ts
Install:
npm i @kmudrick/json-schema-io-ts-codecs
Use in code:
import * as E from "fp-ts/lib/Either";
import { jsonSchema7Decoder } from "@kmudrick/json-schema-io-ts-codecs/dist/cjs";
import { JSONSchema7 } from "json-schema";
const schema: unknown = {
foo: {
description: "This is a Foo",
type: "object",
required: ["barType", "fooId"],
properties: {
fooUpdatedTimestamp: {
description: "Time last updated",
type: "string",
format: "date-time",
readOnly: true,
example: "1994-11-05T08:15:30Z",
},
fooId: {
description: "The unique id of the Foo",
maxLength: 13,
minLength: 1,
pattern: "^[0-9]*$",
example: "10000673458",
},
barType: {
description: "The Bar type of the Foo",
type: "string",
maxLength: 500,
example: "BazBat",
},
},
},
};
const result = jsonSchema7Decoder.decode(schema);
if (E.isRight(result)) {
const value: JSONSchema7 = result.right;
console.log(`Valid JSONSchema7: ${JSON.stringify(value)}`);
} else {
console.log(`invalid: ${result.left}`);
}
FAQs
Codecs to parse JSON Schema Documents using io-ts
The npm package @kmudrick/json-schema-io-ts-codecs receives a total of 7 weekly downloads. As such, @kmudrick/json-schema-io-ts-codecs popularity was classified as not popular.
We found that @kmudrick/json-schema-io-ts-codecs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.