node-xmpp-stanza
Advanced tools
Comparing version 1.1.0 to 6.1.0
@@ -6,2 +6,11 @@ 'use strict' | ||
/** | ||
* JSX compatible API, use this function as pragma | ||
* https://facebook.github.io/jsx/ | ||
* Returns a Stanza if name is presence, message or iq an ltx Element otherwise. | ||
*a | ||
* @param {string} name name of the element | ||
* @param {object} attrs object of attribute key/value pairs | ||
* @return {Element} Stanza or Element | ||
*/ | ||
module.exports = function createStanza (name, attrs /*, child1, child2, ...*/) { | ||
@@ -8,0 +17,0 @@ var el |
@@ -12,16 +12,2 @@ 'use strict' | ||
Stanza.prototype.clone = function () { | ||
var clone = new Stanza(this.name, {}) | ||
for (var k in this.attrs) { | ||
if (this.attrs.hasOwnProperty(k)) { | ||
clone.attrs[k] = this.attrs[k] | ||
} | ||
} | ||
for (var i = 0; i < this.children.length; i++) { | ||
var child = this.children[i] | ||
clone.cnode(child.clone ? child.clone() : child) | ||
} | ||
return clone | ||
} | ||
/** | ||
@@ -28,0 +14,0 @@ * Common attribute getters/setters to all stanzas |
{ | ||
"name": "node-xmpp-stanza", | ||
"version": "1.1.0", | ||
"version": "6.1.0", | ||
"description": "XMPP stanza for JavaScript", | ||
"repository": "github:node-xmpp/node-xmpp", | ||
"homepage": "http://github.com/node-xmpp/node-xmpp", | ||
"bugs": "http://github.com/node-xmpp/node-xmpp/issues", | ||
"scripts": { | ||
"prepublish": "npm run bundle", | ||
"preversion": "npm test", | ||
"unit": "mocha --recursive test/", | ||
"bundle": "browserify index.js -s stanza -o bundle.js", | ||
"lint": "standard", | ||
"test": "npm run unit && npm run lint && npm run bundle" | ||
"preversion": "npm test" | ||
}, | ||
"homepage": "https://github.com/node-xmpp/stanza", | ||
"repository": "github:node-xmpp/stanza", | ||
"bugs": "https://github.com/node-xmpp/stanza/issues", | ||
"keywords": [ | ||
@@ -23,8 +18,7 @@ "XMPP", | ||
], | ||
"author": "Sonny Piers <sonny@fastmail.net>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"inherits": "^2.0.1", | ||
"ltx": "^2.2.0" | ||
"ltx": "^2.3.0" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
1
8
1
4393
131
3
2
Updatedltx@^2.3.0