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

mpns

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpns - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # MPNS: Changelog

2.0.1:
* Contains a compatibility fix (thanks @yavorg) allowing for an older broken property case name, `smallbackgroundImage` to be translated to `smallBackgroundImage`.
2.0.0:

@@ -9,0 +13,0 @@

@@ -299,2 +299,9 @@ // Copyright Jeff Wilcox

var payload = Array.prototype.shift.apply(args);
// Adding back support for legacy 'smallbackgroundTile' property name,
// the removal of which was breaking backwards compat
if (payload.smallbackgroundImage) {
payload.smallBackgroundImage = payload.smallbackgroundImage;
}
copyOfInterest(payload, params, typeProperties, type === 'tile');

@@ -301,0 +308,0 @@ copyOfInterest(payload, params, properties.ssl, false);

2

package.json
{
"name": "mpns",
"description": "A Node.js interface to the Microsoft Push Notification Service (MPNS) for Windows Phone.",
"version": "2.0.0",
"version": "2.0.1",
"author": "Jeff Wilcox <jeffwilcox+github@gmail.com>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -72,13 +72,2 @@ #mpns

### Create a new notification object
You can create a new notification object (either of type live tile or toast). This is the original style for this module but it is now recommended that you use the shorter `send*` syntax on the mpns object itself. This aligns with the WNS module for Windows in its simplicity.
Property names for the notification object directly correlate to the names used in the MPNS XML payload as documented on MSDN. Properties can either be set directly on the object (such as toast.text1) or by passing the values in as options to the constructor.
```javascript
options = { text1: 'Hello!', text2: 'Great to see you today.' };
var toast = new mpns.toast(options);
```
### Sending a raw notification

@@ -85,0 +74,0 @@ When creating the notification object, either provide the raw payload first, or as the `options.payload` property.

@@ -148,2 +148,10 @@ // Copyright Jeff Wilcox

test('CreateFlipTileWithObjectLegacySmallBackgroundImage', function () {
var tile = mpns.createFlipTile({
smallbackgroundImage : 'smallBackgroundImage'
});
assert.deepEqual(tile.smallBackgroundImage, 'smallBackgroundImage');
});
test('CreateTileWithPrimitives', function () {

@@ -150,0 +158,0 @@ var tile = mpns.createTile('', 1, 'hello', '', 'backtitle', 'backcontent');

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