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

rosie

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rosie - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

16

package.json
{
"name": "rosie",
"version": "2.0.1",
"version": "2.1.0",
"description": "factory for building JavaScript objects, mostly useful for setting up test data. Inspired by factory_girl",

@@ -12,11 +12,15 @@ "keywords": [

"contributors": [
"Brian Donovan <me@brian-donovan.com>"
"Brian Donovan"
],
"dependencies": {},
"devDependencies": {
"eslint": "^3.4.0",
"jest": "^22.4.3"
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-jest": "^24.0.2",
"jest": "^26.4.2",
"prettier": "^2.1.2",
"prettier-check": "^2.0.0"
},
"engines": {
"node": "*"
"node": ">=10"
},

@@ -29,3 +33,3 @@ "repository": {

"scripts": {
"pretest": "eslint src",
"pretest": "eslint src && prettier-check src/rosie.js src/__tests__/rosie.test.js README.md",
"test": "jest",

@@ -32,0 +36,0 @@ "watch": "jest --watch"

# Rosie
[![Build Status](https://travis-ci.org/rosiejs/rosie.svg?branch=master)](https://travis-ci.org/rosiejs/rosie)
![Rosie the Riveter](https://upload.wikimedia.org/wikipedia/commons/thumb/1/12/We_Can_Do_It%21.jpg/220px-We_Can_Do_It%21.jpg)
![Rosie the Riveter](http://upload.wikimedia.org/wikipedia/commons/thumb/1/12/We_Can_Do_It%21.jpg/220px-We_Can_Do_It%21.jpg)
Rosie is a factory for building JavaScript objects, mostly useful for setting up test data. It is inspired by [factory_girl](https://github.com/thoughtbot/factory_girl).

@@ -15,4 +13,4 @@

1. Factory definition
2. Object building
1. Factory definition
2. Object building

@@ -25,12 +23,12 @@ **Factory Definition:** Define your factory, giving it a name and optionally a constructor function (`game` in this example):

.attr('is_over', false)
.attr('created_at', function() { return new Date(); })
.attr('random_seed', function() { return Math.random(); })
.attr('created_at', () => new Date())
.attr('random_seed', () => Math.random())
// Default to two players. If players were given, fill in
// whatever attributes might be missing.
.attr('players', ['players'], function(players) {
if (!players) { players = [{}, {}]; }
return players.map(function(data) {
return Factory.attributes('player', data);
});
.attr('players', ['players'], (players) => {
if (!players) {
players = [{}, {}];
}
return players.map((data) => Factory.attributes('player', data));
});

@@ -40,7 +38,9 @@

.sequence('id')
.sequence('name', function(i) { return 'player' + i; });
.sequence('name', (i) => {
return 'player' + i;
})
// Define `position` to depend on `id`.
.attr('position', ['id'], function(id) {
var positions = ['pitcher', '1st base', '2nd base', '3rd base'];
.attr('position', ['id'], (id) => {
const positions = ['pitcher', '1st base', '2nd base', '3rd base'];
return positions[id % positions.length];

@@ -55,3 +55,3 @@ });

```js
var game = Factory.build('game', {is_over:true});
const game = Factory.build('game', { is_over: true });
// Built object (note scores are random):

@@ -81,3 +81,3 @@ //{

```js
var moment = require('moment');
const moment = require('moment');

@@ -87,9 +87,9 @@ Factory.define('matches')

.option('numMatches', 2)
.attr('matches', ['numMatches', 'seasonStart'], function(numMatches, seasonStart) {
var matches = [];
for (var i = 1; i <= numMatches; i++) {
.attr('matches', ['numMatches', 'seasonStart'], (numMatches, seasonStart) => {
const matches = [];
for (const i = 1; i <= numMatches; i++) {
matches.push({
matchDate: moment(seasonStart).add(i, 'week').format('YYYY-MM-DD'),
homeScore: Math.floor(Math.random() * 5),
awayScore: Math.floor(Math.random() * 5)
awayScore: Math.floor(Math.random() * 5),
});

@@ -125,6 +125,8 @@ }

is_over: false,
created_at: function() { return new Date(); }),
random_seed: function() { return Math.random(); })
created_at: () => new Date(),
random_seed: () => Math.random(),
})
.attr('players', ['players'], function(players) { /* etc. */ })
.attr('players', ['players'], (players) => {
/* etc. */
});
```

@@ -140,8 +142,8 @@

.sequence('id')
.attr('players', ['id', 'buildPlayer'], function(id, buildPlayer) {
.attr('players', ['id', 'buildPlayer'], (id, buildPlayer) => {
if (buildPlayer) {
return [Factory.build('player', {coach_id: id})];
return [Factory.build('player', { coach_id: id })];
}
})
.after(function(coach, options) {
.after((coach, options) => {
if (options.buildPlayer) {

@@ -152,3 +154,3 @@ console.log('built player:', coach.players[0]);

Factory.build('coach', {}, {buildPlayer: true});
Factory.build('coach', {}, { buildPlayer: true });
```

@@ -169,15 +171,14 @@

```js
var SimpleClass = function(args) {
this.moops = 'correct';
this.args = args;
};
class SimpleClass {
constructor(args) {
this.moops = 'correct';
this.args = args;
}
SimpleClass.prototype = {
isMoopsCorrect: function() {
isMoopsCorrect() {
return this.moops;
}
};
}
testFactory = Factory.define('test', SimpleClass)
.attr('some_var', 4);
testFactory = Factory.define('test', SimpleClass).attr('some_var', 4);

@@ -198,3 +199,2 @@ testInstance = testFactory.build({ stuff: 2 });

// correct
```

@@ -206,6 +206,8 @@

To use Rosie in node, you'll need to require it first:
To use Rosie in node, you'll need to import it first:
```js
var Factory = require('rosie').Factory;
import { Factory } from 'rosie';
// or with `require`
const Factory = require('rosie').Factory;
```

@@ -217,8 +219,6 @@

// factories/game.js
var Factory = require('rosie').Factory;
import { Factory } from 'rosie';
module.exports = new Factory()
.sequence('id')
.attr('is_over', false);
// etc
export default new Factory().sequence('id').attr('is_over', false);
// etc
```

@@ -229,32 +229,21 @@

```js
var Game = require('./factories/game');
import Game from './factories/game';
var game = Game.build({is_over: true});
const game = Game.build({ is_over: true });
```
## Usage in ES6
A tool like [babel](https://babeljs.io) is currently required to use this syntax.
Unregistered factories are even more natural in ES6:
You can also extend an existing unregistered factory:
```js
// factories/game.js
// factories/scored-game.js
import { Factory } from 'rosie';
import Game from './game';
export default new Factory()
.sequence('id')
.attrs({
is_over: false,
created_at: () => new Date(),
random_seed: () => Math.random()
})
// etc
// index.js
import Game from './factories/game';
const game = Game.build({is_over: true});
export default new Factory().extend(Game).attrs({
score: 10,
});
```
A tool like [babel](https://babeljs.io) is currently required to use this syntax.
## Rosie API

@@ -272,6 +261,5 @@

* **Factory.define(``factory_name``)** - Defines a factory by name. Return an instance of a Factory that you call `.attr`, `.option`, `.sequence`, and `.after` on the result to define the properties of this factory.
* **Factory.define(`factory_name`, `constructor`)** - Optionally pass a constuctor function, and the objects produced by `.build` will be passed through the `constructor` function.
- **Factory.define(`factory_name`)** - Defines a factory by name. Return an instance of a Factory that you call `.attr`, `.option`, `.sequence`, and `.after` on the result to define the properties of this factory.
- **Factory.define(`factory_name`, `constructor`)** - Optionally pass a constuctor function, and the objects produced by `.build` will be passed through the `constructor` function.
#### instance.attr:

@@ -281,5 +269,5 @@

* **instance.attr(`attribute_name`, `default_value`)** - `attribute_name` is required and is a string, `default_value` is the value to use by default for the attribute
* **instance.attr(`attribute_name`, `generator_function`)** - `generator_function` is called to generate the value of the attribute
* **instance.attr(`attribute_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an attribute or option that is required by the `generator_function` to generate the value of the attribute. This list of `dependencies` will match the parameters that are passed to the `generator_function`
- **instance.attr(`attribute_name`, `default_value`)** - `attribute_name` is required and is a string, `default_value` is the value to use by default for the attribute
- **instance.attr(`attribute_name`, `generator_function`)** - `generator_function` is called to generate the value of the attribute
- **instance.attr(`attribute_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an attribute or option that is required by the `generator_function` to generate the value of the attribute. This list of `dependencies` will match the parameters that are passed to the `generator_function`

@@ -290,3 +278,3 @@ #### instance.attrs:

* **instance.attrs(`{attribute_1: value_1, attribute_2: value_2, ...}`)** - `attribute_i` is a string, `value_i` is either an object or generator function.
- **instance.attrs(`{attribute_1: value_1, attribute_2: value_2, ...}`)** - `attribute_i` is a string, `value_i` is either an object or generator function.

@@ -299,5 +287,5 @@ See `instance.attr` above for details. Note: there is no way to specify dependencies using this method, so if you need that, you should use `instance.attr` instead.

* **instance.option(`option_name`, `default_value`)** - `option_name` is required and is a string, `default_value` is the value to use by default for the option
* **instance.option(`option_name`, `generator_function`)** - `generator_function` is called to generate the value of the option
* **instance.option(`option_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an attribute or option that is required by the `generator_function` to generate the value of the option. This list of `dependencies` will match the parameters that are passed to the `generator_function`
- **instance.option(`option_name`, `default_value`)** - `option_name` is required and is a string, `default_value` is the value to use by default for the option
- **instance.option(`option_name`, `generator_function`)** - `generator_function` is called to generate the value of the option
- **instance.option(`option_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an option that is required by the `generator_function` to generate the value of the option. This list of `dependencies` will match the parameters that are passed to the `generator_function`

@@ -308,9 +296,9 @@ #### instance.sequence:

* **instance.sequence(`sequence_name`)** - define a sequence called `sequence_name`, set the start value to 1
* **instance.sequence(`sequence_name`, `generator_function`)** - `generator_function` is called to generate the value of the sequence. When the `generator_function` is called the pre-incremented sequence number will be passed as the first parameter, followed by any dependencies that have been specified.
* **instance.sequence(`sequence_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an attribute or option that is required by the `generator_function` to generate the value of the option. The value of each specified dependency will be passed ar parameters 2..N to the `generator_function`, noting again that the pre-incremented sequence number is passed as the first parameter.
- **instance.sequence(`sequence_name`)** - define a sequence called `sequence_name`, set the start value to 1
- **instance.sequence(`sequence_name`, `generator_function`)** - `generator_function` is called to generate the value of the sequence. When the `generator_function` is called the pre-incremented sequence number will be passed as the first parameter, followed by any dependencies that have been specified.
- **instance.sequence(`sequence_name`, `dependencies`, `generator_function`)** - `dependencies` is an array of strings, each string is the name of an attribute or option that is required by the `generator_function` to generate the value of the option. The value of each specified dependency will be passed as parameters 2..N to the `generator_function`, noting again that the pre-incremented sequence number is passed as the first parameter.
#### instance.after:
* **instance.after(`callback`)** - register a `callback` function that will be called at the end of the object build process. The `callback` is invoked with two params: (`build_object`, `object_options`). See the [Post Build Callback](#post-build-callback) section for examples.
- **instance.after(`callback`)** - register a `callback` function that will be called at the end of the object build process. The `callback` is invoked with two params: (`build_object`, `object_options`). See the [Post Build Callback](#post-build-callback) section for examples.

@@ -323,4 +311,4 @@ ### Object building functions

* **Factory.build(`factory_name`, `attributes`, `options`)** - when build is called against the rosie Factory singleton, the first param is the name of the factory to use to build the object. The second is an object containing attribute override key value pairs, and the third is a object containing option key value pairs
* **instance.build(`attributes`, `options`)** - when build is called on a factory instance only the `attributes` and `options` objects are necessary
- **Factory.build(`factory_name`, `attributes`, `options`)** - when build is called against the rosie Factory singleton, the first param is the name of the factory to use to build the object. The second is an object containing attribute override key value pairs, and the third is a object containing option key value pairs
- **instance.build(`attributes`, `options`)** - when build is called on a factory instance only the `attributes` and `options` objects are necessary

@@ -331,5 +319,27 @@ #### buildList

* **Factory.buildList(`factory_name`, size, `attributes`, `options`)** - when buildList is called against the rosie Factory singleton, the first param is the name of the factory to use to build the object. The `attributes` and `options` behave the same as the call to `.build`.
* **instance.buildList(size, `attributes`, `options`)** - when buildList is called on a factory instance only the size, `attributes` and `options` objects are necessary (strictly speaking only the size is necessary)
- **Factory.buildList(`factory_name`, size, `attributes`, `options`)** - when buildList is called against the rosie Factory singleton, the first param is the name of the factory to use to build the object. The `attributes` and `options` behave the same as the call to `.build`.
- **instance.buildList(size, `attributes`, `options`)** - when buildList is called on a factory instance only the size, `attributes` and `options` objects are necessary (strictly speaking only the size is necessary)
### Testing
You may find `resetAll` useful when working with testing frameworks such as Jest. It resets any build state, such as sequences, to their original values:
```js
import Factory from 'rosie';
beforeEach(() => {
Factory.resetAll();
});
```
Or call `reset` on a specific factory:
```js
import Game from './game';
beforeEach(() => {
Game.reset();
});
```
## Contributing

@@ -336,0 +346,0 @@

/**
* Creates a new factory with attributes, options, etc. to be used to build
* objects. Generally you should use `Factory.define()` instead of this
* constructor.
* objects.
*

@@ -9,11 +8,13 @@ * @param {Function=} constructor

*/
var Factory = function(constructor) {
this.construct = constructor;
this._attrs = {};
this.opts = {};
this.sequences = {};
this.callbacks = [];
};
class Factory {
constructor(constructor) {
this.construct = constructor;
this._attrs = {};
this.opts = {};
this.sequences = {};
this.callbacks = [];
Factory.prototype = {
Factory._allFactories.push(this);
}
/**

@@ -58,4 +59,4 @@ * Define an attribute on this factory. Attributes can optionally define a

*/
attr: function(attr, dependencies, value) {
var builder;
attr(attr, dependencies, value) {
let builder;
if (arguments.length === 2) {

@@ -66,6 +67,6 @@ value = dependencies;

builder = typeof value === 'function' ? value : function() { return value; };
builder = typeof value === 'function' ? value : () => value;
this._attrs[attr] = { dependencies: dependencies || [], builder: builder };
return this;
},
}

@@ -87,5 +88,5 @@ /**

*/
attrs: function(attributes) {
for (var attr in attributes) {
if (Factory.util.hasOwnProp(attributes, attr)) {
attrs(attributes) {
for (let attr in attributes) {
if (Object.prototype.hasOwnProperty.call(attributes, attr)) {
this.attr(attr, attributes[attr]);

@@ -95,3 +96,3 @@ }

return this;
},
}

@@ -126,4 +127,4 @@ /**

*/
option: function(opt, dependencies, value) {
var builder;
option(opt, dependencies, value) {
let builder;
if (arguments.length === 2) {

@@ -134,7 +135,7 @@ value = dependencies;

if (arguments.length > 1) {
builder = typeof value === 'function' ? value : function() { return value; };
builder = typeof value === 'function' ? value : () => value;
}
this.opts[opt] = { dependencies: dependencies || [], builder: builder };
this.opts[opt] = { dependencies: dependencies || [], builder };
return this;
},
}

@@ -158,18 +159,14 @@ /**

*/
sequence: function(attr, dependencies, builder) {
var factory = this;
sequence(attr, dependencies, builder) {
if (arguments.length === 2) {
builder = /** @type function(number): * */dependencies;
builder = /** @type function(number): * */ dependencies;
dependencies = null;
}
builder = builder || function(i) { return i; };
return this.attr(attr, dependencies, function() {
var args = [].slice.call(arguments);
factory.sequences[attr] = factory.sequences[attr] || 0;
args.unshift(++factory.sequences[attr]);
return builder.apply(null, args);
builder = builder || ((i) => i);
return this.attr(attr, dependencies, (...args) => {
this.sequences[attr] = this.sequences[attr] || 0;
args.unshift(++this.sequences[attr]);
return builder(...args);
});
},
}

@@ -184,6 +181,6 @@ /**

*/
after: function(callback) {
after(callback) {
this.callbacks.push(callback);
return this;
},
}

@@ -199,10 +196,10 @@ /**

*/
attributes: function(attributes, options) {
attributes = Factory.util.extend({}, attributes);
attributes(attributes, options) {
attributes = { ...attributes };
options = this.options(options);
for (var attr in this._attrs) {
for (let attr in this._attrs) {
this._attrValue(attr, attributes, options, [attr]);
}
return attributes;
},
}

@@ -220,9 +217,12 @@ /**

*/
_attrValue: function(attr, attributes, options, stack) {
if (!this._alwaysCallBuilder(attr) && Factory.util.hasOwnProp(attributes, attr)) {
_attrValue(attr, attributes, options, stack) {
if (
!this._alwaysCallBuilder(attr) &&
Object.prototype.hasOwnProperty.call(attributes, attr)
) {
return attributes[attr];
}
var value = this._buildWithDependencies(this._attrs[attr], function(dep) {
if (Factory.util.hasOwnProp(options, dep)) {
const value = this._buildWithDependencies(this._attrs[attr], (dep) => {
if (Object.prototype.hasOwnProperty.call(options, dep)) {
return options[dep];

@@ -232,3 +232,5 @@ } else if (dep === attr) {

} else if (stack.indexOf(dep) >= 0) {
throw new Error('detected a dependency cycle: ' + stack.concat([dep]).join(' -> '));
throw new Error(
'detected a dependency cycle: ' + stack.concat([dep]).join(' -> ')
);
} else {

@@ -240,3 +242,3 @@ return this._attrValue(dep, attributes, options, stack.concat([dep]));

return value;
},
}

@@ -251,6 +253,6 @@ /**

*/
_alwaysCallBuilder: function(attr) {
var attrMeta = this._attrs[attr];
_alwaysCallBuilder(attr) {
const attrMeta = this._attrs[attr];
return attrMeta.dependencies.indexOf(attr) >= 0;
},
}

@@ -264,9 +266,9 @@ /**

*/
options: function(options) {
options = Factory.util.extend({}, options || {});
for (var opt in this.opts) {
options(options = {}) {
options = { ...options };
for (let opt in this.opts) {
options[opt] = this._optionValue(opt, options);
}
return options;
},
}

@@ -282,16 +284,18 @@ /**

*/
_optionValue: function(opt, options) {
if (Factory.util.hasOwnProp(options, opt)) {
_optionValue(opt, options) {
if (Object.prototype.hasOwnProperty.call(options, opt)) {
return options[opt];
}
var optMeta = this.opts[opt];
const optMeta = this.opts[opt];
if (!optMeta.builder) {
throw new Error('option `' + opt + '` has no default value and none was provided');
throw new Error(
'option `' + opt + '` has no default value and none was provided'
);
}
return this._buildWithDependencies(optMeta, function(dep) {
return this._optionValue(dep, options);
});
},
return this._buildWithDependencies(optMeta, (dep) =>
this._optionValue(dep, options)
);
}

@@ -307,8 +311,7 @@ /**

*/
_buildWithDependencies: function(meta, getDep) {
var deps = meta.dependencies;
var self = this;
var args = deps.map(function(){ return getDep.apply(self, arguments); });
_buildWithDependencies(meta, getDep) {
const deps = meta.dependencies;
const args = deps.map((...args) => getDep.apply(this, args));
return meta.builder.apply(this, args);
},
}

@@ -323,8 +326,8 @@ /**

*/
build: function(attributes, options) {
var result = this.attributes(attributes, options);
var retval = null;
build(attributes, options) {
const result = this.attributes(attributes, options);
let retval = null;
if (this.construct) {
var Constructor = this.construct;
const Constructor = this.construct;
retval = new Constructor(result);

@@ -335,16 +338,16 @@ } else {

for (var i = 0; i < this.callbacks.length; i++) {
var callbackResult = this.callbacks[i](retval, this.options(options));
for (let i = 0; i < this.callbacks.length; i++) {
const callbackResult = this.callbacks[i](retval, this.options(options));
retval = callbackResult || retval;
}
return retval;
},
}
buildList: function(size, attributes, options) {
var objs = [];
for (var i = 0; i < size; i++) {
buildList(size, attributes, options) {
const objs = [];
for (let i = 0; i < size; i++) {
objs.push(this.build(attributes, options));
}
return objs;
},
}

@@ -359,8 +362,10 @@ /**

*/
extend: function(name) {
var factory = (typeof name === 'string') ? Factory.factories[name] : name;
extend(name) {
const factory = typeof name === 'string' ? Factory.factories[name] : name;
// Copy the parent's constructor
if (this.construct === undefined) { this.construct = factory.construct; }
Factory.util.extend(this._attrs, factory._attrs);
Factory.util.extend(this.opts, factory.opts);
if (this.construct === undefined) {
this.construct = factory.construct;
}
Object.assign(this._attrs, factory._attrs);
Object.assign(this.opts, factory.opts);
// Copy the parent's callbacks

@@ -370,45 +375,17 @@ this.callbacks = factory.callbacks.slice();

}
};
/**
* @private
*/
Factory.util = (function() {
var hasOwnProp = Object.prototype.hasOwnProperty;
/**
* Resets any state changed by building objects back to the original values.
* Preserves attributes and options as-is.
*/
reset() {
this.sequences = {};
}
}
return {
/**
* Determines whether `object` has its own property named `prop`.
*
* @private
* @param {object} object
* @param {string} prop
* @return {boolean}
*/
hasOwnProp: function(object, prop) {
return hasOwnProp.call(object, prop);
},
/**
* Extends `dest` with all of own properties of `source`.
*
* @private
* @param {object} dest
* @param {object=} source
* @return {object}
*/
extend: function(dest, source) {
if (source) {
for (var key in source) {
if (hasOwnProp.call(source, key)) {
dest[key] = source[key];
}
}
}
return dest;
}
};
})();
Factory.factories = {};
Object.defineProperty(Factory, '_allFactories', {
value: [],
enumerable: false,
});

@@ -423,4 +400,4 @@ /**

*/
Factory.define = function(name, constructor) {
var factory = new Factory(constructor);
Factory.define = function (name, constructor) {
const factory = new Factory(constructor);
this.factories[name] = factory;

@@ -438,5 +415,5 @@ return factory;

*/
Factory.build = function(name, attributes, options) {
Factory.build = function (name, attributes, options) {
if (!this.factories[name]) {
throw new Error('The "' + name + '" factory is not defined.');
throw new Error(`The "${name}" factory is not defined.`);
}

@@ -455,5 +432,5 @@ return this.factories[name].build(attributes, options);

*/
Factory.buildList = function(name, size, attributes, options) {
var objs = [];
for (var i = 0; i < size; i++) {
Factory.buildList = function (name, size, attributes, options) {
const objs = [];
for (let i = 0; i < size; i++) {
objs.push(Factory.build(name, attributes, options));

@@ -472,6 +449,31 @@ }

*/
Factory.attributes = function(name, attributes, options) {
Factory.attributes = function (name, attributes, options) {
return this.factories[name].attributes(attributes, options);
};
/**
* Resets a factory by name. Preserves attributes and options as-is.
*
* @param {string} name
*/
Factory.reset = function (name) {
Factory.factories[name].reset();
};
/**
* Resets all factory build state. Preserves attributes and options as-is.
*/
Factory.resetAll = function () {
Factory._allFactories.forEach((factory) => factory.reset());
};
/**
* Unregister and forget all existing factories.
*/
Factory.implode = function () {
Factory.factories = {};
Factory._allFactories.length = 0;
};
/* istanbul ignore next */
if (typeof exports === 'object' && typeof module !== 'undefined') {

@@ -483,3 +485,5 @@ /* eslint-env commonjs */

/* eslint-env amd */
define([], function() { return {Factory: Factory}; });
define([], () => ({
Factory: Factory,
}));
/* eslint-env amd:false */

@@ -486,0 +490,0 @@ } else if (this) {

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