Socket
Socket
Sign inDemoInstall

json-schema-to-typescript

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-schema-to-typescript - npm Package Compare versions

Comparing version 10.1.1 to 10.1.2

6

dist/src/parser.js

@@ -80,3 +80,3 @@ "use strict";

function parseNonLiteral(schema, type, options, keyName, processed, usedNames) {
var definitions = getDefinitions(JSONSchema_1.getRootSchema(schema)); // TODO
var definitions = getDefinitionsMemoized(JSONSchema_1.getRootSchema(schema)); // TODO
var keyNameFromDefinition = lodash_1.findKey(definitions, function (_) { return _ === schema; });

@@ -349,5 +349,2 @@ switch (type) {

}
/**
* TODO: Memoize
*/
function getDefinitions(schema, isSchema, processed) {

@@ -368,2 +365,3 @@ if (isSchema === void 0) { isSchema = true; }

}
var getDefinitionsMemoized = lodash_1.memoize(getDefinitions);
/**

@@ -370,0 +368,0 @@ * TODO: Reduce rate of false positives

{
"name": "json-schema-to-typescript",
"version": "10.1.1",
"version": "10.1.2",
"description": "compile json schema to typescript typings",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

import {JSONSchema4Type, JSONSchema4TypeName} from 'json-schema'
import {findKey, includes, isPlainObject, map, omit} from 'lodash'
import {findKey, includes, isPlainObject, map, memoize, omit} from 'lodash'
import {format} from 'util'

@@ -122,3 +122,3 @@ import {Options} from './'

): AST {
const definitions = getDefinitions(getRootSchema(schema as any)) // TODO
const definitions = getDefinitionsMemoized(getRootSchema(schema as any)) // TODO
const keyNameFromDefinition = findKey(definitions, _ => _ === schema)

@@ -437,5 +437,2 @@

/**
* TODO: Memoize
*/
function getDefinitions(

@@ -474,2 +471,4 @@ schema: LinkedJSONSchema,

const getDefinitionsMemoized = memoize(getDefinitions)
/**

@@ -476,0 +475,0 @@ * TODO: Reduce rate of false positives

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