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

mm

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mm - npm Package Compare versions

Comparing version 0.1.8 to 0.2.0

5

History.md
0.2.0 / 2014-02-21
==================
* support thunkify cnpm/cnpmjs.org#196
0.1.8 / 2013-12-27

@@ -3,0 +8,0 @@ ==================

17

lib/mm.js

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

/*!
/**!
* mm - lib/mm.js

@@ -20,2 +20,3 @@ *

var semver = require('semver');
var thunkify = require('thunkify');

@@ -38,5 +39,11 @@ var mock = module.exports = function mock(obj, key, method) {

}
if (!callback) {
throw new TypeError('Can\'t find callback function');
}
// support thunk fn(a1, a2, cb, cbThunk)
if (typeof args[index - 1] === 'function') {
callback = args[index - 1];
}
return callback;

@@ -65,3 +72,3 @@ }

timeout = timeout || 0;
mock(mod, method, function () {
mock(mod, method, thunkify(function () {
var callback = getCallback(arguments);

@@ -71,3 +78,3 @@ setTimeout(function () {

}, timeout);
});
}));
return this;

@@ -92,3 +99,3 @@ };

}
mock(mod, method, function () {
mock(mod, method, thunkify(function () {
var callback = getCallback(arguments);

@@ -98,3 +105,3 @@ setTimeout(function () {

}, timeout);
});
}));
return this;

@@ -101,0 +108,0 @@ };

This software is licensed under the MIT License.
Copyright (C) 2012 - 2013 fengmk2 <fengmk2@gmail.com>
Copyright (C) 2012 - 2014 fengmk2 <fengmk2@gmail.com>

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "mm",
"version": "0.1.8",
"version": "0.2.0",
"description": "mock mate, mock http request, fs access and so on.",

@@ -19,15 +19,17 @@ "main": "index.js",

"dependencies": {
"muk": ">=0.3.1",
"semver": "~2.2.1"
"muk": "0.3.1",
"semver": "2.2.1",
"thunkify": "0.0.1"
},
"devDependencies": {
"autod": "*",
"blanket": "*",
"contributors": "*",
"should": "*",
"travis-cov": "*",
"node-patch": "*",
"blanket": "*",
"coveralls": "*",
"mocha": "*",
"mocha-lcov-reporter": "*",
"pedding": "*",
"mocha": "*"
"node-patch": "*",
"pedding": "0.0.3",
"should": "3.1.2",
"travis-cov": "*"
},

@@ -34,0 +36,0 @@ "homepage": "http://github.com/fengmk2/mm",

@@ -155,3 +155,3 @@ mm (美眉,Mock伴侣) [![Build Status](https://secure.travis-ci.org/fengmk2/mm.png)](http://travis-ci.org/fengmk2/mm) [![Coverage Status](https://coveralls.io/repos/fengmk2/mm/badge.png)](https://coveralls.io/r/fengmk2/mm)

Copyright (c) 2012 - 2013 fengmk2 &lt;fengmk2@gmail.com&gt;
Copyright (c) 2012 - 2014 fengmk2 &lt;fengmk2@gmail.com&gt;

@@ -158,0 +158,0 @@ Permission is hereby granted, free of charge, to any person obtaining

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