You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

xmpp-jid

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmpp-jid - npm Package Compare versions

Comparing version

to
1.1.0

16

index.js

@@ -113,2 +113,18 @@ 'use strict';

exports.isBare = function (jid) {
jid = new exports.JID(jid);
var hasResource = !!jid.resource;
return !hasResource;
};
exports.isFull = function (jid) {
jid = new exports.JID(jid);
var hasResource = !!jid.resource;
return hasResource;
};
exports.escape = function (val) {

@@ -115,0 +131,0 @@ return val.replace(/^\s+|\s+$/g, '')

2

package.json
{
"name": "xmpp-jid",
"description": "Parse XMPP URIs",
"version": "1.0.4",
"version": "1.1.0",
"author": "Lance Stout <lance@andyet.net>",

@@ -6,0 +6,0 @@ "browser": {

@@ -326,2 +326,20 @@ var test = require('tape');

test('isBare', function (t) {
var jid1 = new JID('local@example.com');
var jid2 = new JID('local@example.com/resource');
t.ok(xmppjid.isBare(jid1));
t.notOk(xmppjid.isBare(jid2));
t.end();
});
test('isFull', function (t) {
var jid1 = new JID('local@example.com/resource');
var jid2 = new JID('local@example.com');
t.ok(xmppjid.isFull(jid1));
t.notOk(xmppjid.isFull(jid2));
t.end();
});
test('Invalid arguments', function (t) {

@@ -328,0 +346,0 @@ t.throws(function () {