http-post-message
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.2.2 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.2.3 | (c) 2016 Microsoft Corporation MIT */ | ||
interface IHttpPostMessageRequest { | ||
@@ -3,0 +3,0 @@ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; |
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.2.2 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.2.3 | (c) 2016 Microsoft Corporation MIT */ | ||
export interface IHttpPostMessageRequest { | ||
@@ -3,0 +3,0 @@ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; |
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.2.2 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.2.3 | (c) 2016 Microsoft Corporation MIT */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.2.2 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.2.3 | (c) 2016 Microsoft Corporation MIT */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["http-post-message"]=e():t["http-post-message"]=e()}(this,function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e){"use strict";var o=function(){function t(t,e,o){void 0===e&&(e={}),this.defaultHeaders=e,this.defaultTargetWindow=o,this.windowPostMessageProxy=t}return t.addTrackingProperties=function(t,e){return t.headers=t.headers||{},e&&e.id&&(t.headers.id=e.id),t},t.getTrackingProperties=function(t){return{id:t.headers&&t.headers.id}},t.isErrorMessage=function(t){return"number"==typeof(t&&t.statusCode)&&!(200<=t.statusCode&&t.statusCode<300)},t.prototype.get=function(t,e,o){return void 0===e&&(e={}),void 0===o&&(o=this.defaultTargetWindow),this.send({method:"GET",url:t,headers:e},o)},t.prototype.post=function(t,e,o,r){return void 0===o&&(o={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"POST",url:t,headers:o,body:e},r)},t.prototype.put=function(t,e,o,r){return void 0===o&&(o={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"PUT",url:t,headers:o,body:e},r)},t.prototype.patch=function(t,e,o,r){return void 0===o&&(o={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"PATCH",url:t,headers:o,body:e},r)},t.prototype["delete"]=function(t,e,o,r){return void 0===e&&(e=null),void 0===o&&(o={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"DELETE",url:t,headers:o,body:e},r)},t.prototype.send=function(t,e){if(void 0===e&&(e=this.defaultTargetWindow),t.headers=this.assign({},this.defaultHeaders,t.headers),!e)throw new Error("target window is not provided. You must either provide the target window explicitly as argument to request, or specify default target window when constructing instance of this class.");return this.windowPostMessageProxy.postMessage(e,t)},t.prototype.assign=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");var r=Object(t);return e.forEach(function(t){if(void 0!==t&&null!==t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}),r},t}();e.HttpPostMessage=o}])}); |
{ | ||
"name": "http-post-message", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A generic messaging component to send HTTP style message payloads over the window.postMessage API. Requires an implementation of window postMessage proxy such as 'window-post-message-proxy'.", | ||
@@ -10,4 +10,5 @@ "main": "dist/httpPostMessage.js", | ||
"test": "gulp test", | ||
"postinstall": "typings install", | ||
"prepublish": "gulp build" | ||
"prepublish": "typings install && gulp build", | ||
"gulp": "gulp", | ||
"typings": "typings" | ||
}, | ||
@@ -42,2 +43,3 @@ "repository": { | ||
"gulp-replace": "^0.5.4", | ||
"gulp-tslint": "^6.1.1", | ||
"gulp-typedoc": "^2.0.0", | ||
@@ -58,2 +60,3 @@ "gulp-uglify": "^1.5.3", | ||
"ts-loader": "^0.8.2", | ||
"tslint": "^3.15.0", | ||
"typedoc": "^0.4.4", | ||
@@ -60,0 +63,0 @@ "typescript": "^1.8.10", |
Sorry, the diff of this file is not supported yet
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
28783
0
29