New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jsonresume/schema

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsonresume/schema - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

4

package.json
{
"name": "@jsonresume/schema",
"version": "1.0.1",
"version": "1.1.0",
"description": "JSON Resume Schema",

@@ -30,3 +30,3 @@ "private": false,

"dependencies": {
"z-schema": "^4.2.4"
"jsonschema": "^1.4.1"
},

@@ -33,0 +33,0 @@ "devDependencies": {

@@ -18,6 +18,8 @@ # JSON Resume Schema

This enforces that the schema package, always has the official stable release of the schema.
### Getting started
```
npm install --save resume-schema
npm install --save @jsonresume/schema
```

@@ -28,3 +30,3 @@

```js
const resumeSchema = require("resume-schema");
const resumeSchema = require("@jsonresume/schema");
resumeSchema.validate(

@@ -31,0 +33,0 @@ { name: "Thomas" },

{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
" $id": "http://example.com/example.json",
"additionalProperties": true,
"definitions": {
"iso8601": {
"type": "string",
"description": "e.g. 2014-06-29",
"description": "Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04",
"pattern": "^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$"

@@ -277,5 +278,3 @@ }

"date": {
"type": "string",
"description": "e.g. 1989-06-12",
"format": "date"
"$ref": "#/definitions/iso8601"
},

@@ -282,0 +281,0 @@ "url": {

@@ -1,15 +0,15 @@

'use strict';
var ZSchema = require('z-schema');
var schema = require('./schema');
"use strict";
var schema = require("./schema");
var Validator = require("jsonschema").Validator;
function validate(resumeJson, callback) {
var callbackWrapper = function(err, valid) {
if(err) {
callback(err)
} else {
callback(null, {valid: valid});
}
var v = new Validator();
const validation = v.validate(resumeJson, schema);
if (!validation.valid) {
return callback(validation.errors, false);
}
new ZSchema().validate(resumeJson, schema, callbackWrapper);
return callback(null, true);
}

@@ -19,3 +19,3 @@

validate: validate,
schema: schema
schema: schema,
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc