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

fishery

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fishery - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

2

dist/builder.d.ts

@@ -17,3 +17,3 @@ import { GeneratorFn, HookFn, DeepPartial, OnCreateFn, AfterCreateFn } from './types';

setOnCreate: (hook: OnCreateFn<T, C>) => void;
_mergeParamsOntoObject(object: T): void;
_mergeParamsOntoObject(object: T): T;
_callAfterBuilds(object: T): void;

@@ -20,0 +20,0 @@ _callOnCreate(object: T): Promise<C>;

@@ -127,4 +127,3 @@ 'use strict';

};
var object = this.generator(generatorOptions);
this._mergeParamsOntoObject(object);
var object = this._mergeParamsOntoObject(this.generator(generatorOptions));
this._callAfterBuilds(object);

@@ -153,3 +152,13 @@ return object;

FactoryBuilder.prototype._mergeParamsOntoObject = function (object) {
merge(object, this.params, this.associations, mergeCustomizer);
if (typeof object !== 'object') {
return object;
}
var targetObject = object;
if (Object.getPrototypeOf(object) === Object.prototype) {
targetObject = {};
}
else if (Array.isArray(object)) {
targetObject = [];
}
return merge(targetObject, object, this.params, this.associations, mergeCustomizer);
};

@@ -156,0 +165,0 @@ FactoryBuilder.prototype._callAfterBuilds = function (object) {

@@ -8,2 +8,2 @@ export declare const merge: {

};
export declare const mergeCustomizer: (objValue: any, srcVal: any, key: 'string', object: any) => any[] | undefined;
export declare const mergeCustomizer: (objValue: any, srcVal: any, key: string, object: any) => any[] | undefined;
{
"name": "fishery",
"version": "2.2.1",
"version": "2.2.2",
"description": "A library for setting up JavaScript factories to help build objects as test data, with full TypeScript support",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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