Socket
Socket
Sign inDemoInstall

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.0.5 to 0.0.6

5

History.md
0.0.6 / 2012-11-21
==================
* fix http.request() twice bug; add res.setEncoding method
0.0.5 / 2012-11-21

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

20

lib/mm.js

@@ -116,5 +116,2 @@ /*!

headers = headers || {};
if (!Array.isArray(data)) {
data = [data];
}
if (delay) {

@@ -125,2 +122,11 @@ delay = parseInt(delay, 10);

mod.request = function (options, callback) {
var datas = [];
if (!Array.isArray(data)) {
datas = [data];
} else {
for (var i = 0; i < data.length; i++) {
datas.push(data[i]);
}
}
var match = matchURL(options, url);

@@ -138,5 +144,8 @@ if (!match) {

var res = new EventEmitter();
res.setEncoding = function (charset) {
res.charset = charset;
};
res.headers = headers;
var ondata = function () {
var chunk = data.shift();
var chunk = datas.shift();
if (!chunk) {

@@ -153,2 +162,5 @@ if (!req._aborted) {

}
if (res.charset) {
chunk = chunk.toString(res.charset);
}
res.emit('data', chunk);

@@ -155,0 +167,0 @@ }

2

package.json
{
"name": "mm",
"version": "0.0.5",
"version": "0.0.6",
"description": "mock mate, mock http request, fs access and so on.",

@@ -5,0 +5,0 @@ "main": "index.js",

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