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

empty-schema

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

empty-schema - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

package.json
{
"name": "empty-schema",
"version": "0.0.4",
"version": "0.0.5",
"description": "Generate empty placeholder data from JSON Schemas",
"main": "dist/index.js",
"main": "lib/index.js",
"scripts": {

@@ -7,0 +7,0 @@ "build": "node ./node_modules/.bin/babel src --out-dir lib",

@@ -21,3 +21,3 @@ # empty-schema

```js
import empty from 'empty-schema'
import {empty} from 'empty-schema'

@@ -24,0 +24,0 @@ const schema = {

@@ -18,3 +18,3 @@ import deref from 'simple-json-schema-deref'

*/
export default function empty(schema, global) {
export default function _empty(schema, global) {
const {

@@ -37,3 +37,3 @@ type,

// var s = deref($ref, global)
// return empty(s, global)
// return _empty(s, global)
} else if (type) {

@@ -74,7 +74,7 @@ let kind

} else if (allOf) {
return empty(merge(allOf), global)
return _empty(merge(allOf), global)
} else if (anyOf) {
return empty(anyOf[0], global)
return _empty(anyOf[0], global)
} else if ( oneOf ) {
return empty(oneOf[0], global)
return _empty(oneOf[0], global)
} else {

@@ -81,0 +81,0 @@ throw new Error(`cannot generate data from schema ${schema}`)

import deref from 'simple-json-schema-deref'
import _empty from './empty'
export { _empty } from './empty'
export { _array } from './array'

@@ -12,6 +14,8 @@ export { _boolean } from './boolean'

export default function(schema) {
export const empty = (schema) => {
const denormed = deref(schema)
return empty(denormed, denormed)
return _empty(denormed, denormed)
}
export { empty as default }
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