Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anatine/zod-mock

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anatine/zod-mock - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

5

package.json
{
"name": "@anatine/zod-mock",
"version": "3.1.1",
"version": "3.2.0",
"description": "Zod auto-mock object generator using Faker at @faker-js/faker",

@@ -25,4 +25,3 @@ "main": "src/index.js",

"@faker-js/faker": "^6.0.0-beta.0",
"randexp": "^0.5.3",
"zod": "^3.13.4"
"randexp": "^0.5.3"
},

@@ -29,0 +28,0 @@ "dependencies": {

4

README.md
# @anatine/zod-mock
Generates a mock data object using [faker.js](https://www.npmjs.com/package/faker) from a [Zod](https://github.com/colinhacks/zod) schema.
Generates a mock data object using [faker.js](https://www.npmjs.com/package/@faker-js/faker) from a [Zod](https://github.com/colinhacks/zod) schema.

@@ -13,3 +13,3 @@ ----

```shell
npm install faker zod @anatine/zod-mock
npm install @faker-js/faker zod @anatine/zod-mock
```

@@ -16,0 +16,0 @@

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

: { transform: () => input };
return effect.transform(input);
return effect.transform(input, { addIssue: () => undefined, path: [] }); // TODO : Discover if context is necessary here
}

@@ -214,3 +214,3 @@ function parseUnion(zodRef, options) {

const mockOptions = zodRef._def.options.map((option) => generateMock(option, options));
return faker_1.faker.helpers.randomize(mockOptions);
return faker_1.faker.helpers.arrayElement(mockOptions);
}

@@ -217,0 +217,0 @@ const workerMap = {

Sorry, the diff of this file is not supported yet

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