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

factory-girl

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

factory-girl - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

38

index.js

@@ -1,2 +0,18 @@

(function() {
(function(factory) {
if (typeof exports !== 'undefined') {
module.exports = factory();
module.exports.ObjectAdapter = require('./lib/object-adapter');
}
else if (typeof define === 'function' && define.amd) {
define(['factory-girl-object-adapter'], function(ObjectAdapter) {
var _factory = factory();
_factory.ObjectAdapter = ObjectAdapter;
return _factory;
});
}
else {
window.Factory = factory();
}
}(function() {
var Factory = function() {

@@ -319,11 +335,2 @@ var factory = this,

if (typeof module === 'undefined') {
this.factory = {};
module = this.factory;
}
module.exports = new Factory();
module.exports.Adapter = Adapter;
module.exports.Factory = Factory;
module.exports.ObjectAdapter = require('./lib/object-adapter');
function merge(obj1, obj2) {

@@ -365,4 +372,4 @@ if (obj1 && obj2) {

}
else {
callback && setImmediate(callback);
else if (callback) {
setImmediate ? setImmediate(callback) : setTimeout(callback, 0);
}

@@ -373,3 +380,8 @@ }

}());
var factory = new Factory();
factory.Adapter = Adapter;
factory.Factory = Factory;
return factory;
}));

@@ -1,12 +0,29 @@

var ObjectAdapter = function() {};
ObjectAdapter.prototype.build = function(Model, props) {
return props;
};
ObjectAdapter.prototype.save = function(doc, Model, cb) {
process.nextTick(function() {
cb(null, doc);
});
};
ObjectAdapter.prototype.destroy = function(doc, Model, cb) {};
(function(adapter) {
module.exports = ObjectAdapter;
if (typeof module !== 'undefined') {
var ObjectAdapter = adapter();
module.exports = ObjectAdapter;
}
else if (typeof define === 'function' && define.amd) {
define('factory-girl-object-adapter', function() {
return adapter();
});
}
else {
window.ObjectAdapter = adapter();
}
}(function() {
var ObjectAdapter = function() {};
ObjectAdapter.prototype.build = function(Model, props) {
return props;
};
ObjectAdapter.prototype.save = function(doc, Model, cb) {
process.nextTick(function() {
cb(null, doc);
});
};
ObjectAdapter.prototype.destroy = function(doc, Model, cb) {};
return ObjectAdapter;
}));

@@ -6,3 +6,3 @@ {

"author": "Simon Wade",
"version": "1.5.0",
"version": "1.6.0",
"keywords": [

@@ -31,5 +31,5 @@ "factory",

"bluebird": "^2.9.25",
"chai": "^1.10.0",
"mocha": ">= 0.7.1",
"should": ">= 0.4.2",
"chai": "^3.0.0",
"mocha": "^2.2.5",
"should": "^6.0.3",
"sinon": "^1.14.1"

@@ -36,0 +36,0 @@ },

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