fetch-mock
Advanced tools
Comparing version 4.5.4 to 4.6.0
@@ -24,8 +24,8 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.fetchMock = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var Headers = void 0; | ||
var Request = void 0; | ||
var Response = void 0; | ||
var stream = void 0; | ||
var theGlobal = void 0; | ||
var statusTextMap = void 0; | ||
var Headers = undefined; | ||
var Request = undefined; | ||
var Response = undefined; | ||
var stream = undefined; | ||
var theGlobal = undefined; | ||
var statusTextMap = undefined; | ||
@@ -147,3 +147,3 @@ /** | ||
var matchUrl = void 0; | ||
var matchUrl = undefined; | ||
@@ -237,3 +237,3 @@ if (typeof route.matcher === 'string') { | ||
this.realFetch = this.realFetch || theGlobal.fetch && theGlobal.fetch.bind(theGlobal); | ||
var config = void 0; | ||
var config = undefined; | ||
// Handle the variety of parameters accepted by mock (see README) | ||
@@ -328,3 +328,3 @@ if (response) { | ||
value: function router(url, opts) { | ||
var route = void 0; | ||
var route = undefined; | ||
for (var i = 0, il = this.routes.length; i < il; i++) { | ||
@@ -331,0 +331,0 @@ route = this.routes[i]; |
@@ -9,8 +9,8 @@ 'use strict'; | ||
var Headers = void 0; | ||
var Request = void 0; | ||
var Response = void 0; | ||
var stream = void 0; | ||
var theGlobal = void 0; | ||
var statusTextMap = void 0; | ||
var Headers = undefined; | ||
var Request = undefined; | ||
var Response = undefined; | ||
var stream = undefined; | ||
var theGlobal = undefined; | ||
var statusTextMap = undefined; | ||
@@ -132,3 +132,3 @@ /** | ||
var matchUrl = void 0; | ||
var matchUrl = undefined; | ||
@@ -222,3 +222,3 @@ if (typeof route.matcher === 'string') { | ||
this.realFetch = this.realFetch || theGlobal.fetch && theGlobal.fetch.bind(theGlobal); | ||
var config = void 0; | ||
var config = undefined; | ||
// Handle the variety of parameters accepted by mock (see README) | ||
@@ -313,3 +313,3 @@ if (response) { | ||
value: function router(url, opts) { | ||
var route = void 0; | ||
var route = undefined; | ||
for (var i = 0, il = this.routes.length; i < il; i++) { | ||
@@ -316,0 +316,0 @@ route = this.routes[i]; |
'use strict'; | ||
var path = require('path'); | ||
require('protips')(path.join(__dirname, '../', 'PROTIPS.md')); | ||
var fetch = require('node-fetch'); | ||
@@ -4,0 +6,0 @@ var Request = fetch.Request; |
{ | ||
"name": "fetch-mock", | ||
"version": "4.5.4", | ||
"version": "4.6.0", | ||
"description": "Mock http requests made using fetch (or isomorphic-fetch)", | ||
@@ -30,3 +30,4 @@ "main": "src/server.js", | ||
"dependencies": { | ||
"node-fetch": "^1.3.3" | ||
"node-fetch": "^1.3.3", | ||
"protips": "^1.1.0" | ||
}, | ||
@@ -33,0 +34,0 @@ "devDependencies": { |
'use strict'; | ||
const path = require('path'); | ||
require('protips')(path.join(__dirname, '../', 'PROTIPS.md')); | ||
const fetch = require('node-fetch'); | ||
@@ -3,0 +5,0 @@ const Request = fetch.Request; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87832
23
2288
2
+ Addedprotips@^1.1.0
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedmarked@0.3.19(transitive)
+ Addedprotips@1.1.0(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)