escape-html
Advanced tools
Comparing version 1.0.1 to 1.0.2
21
index.js
@@ -0,10 +1,23 @@ | ||
/*! | ||
* escape-html | ||
* Copyright(c) 2012-2013 TJ Holowaychuk | ||
* MIT Licensed | ||
*/ | ||
/** | ||
* Module exports. | ||
* @public | ||
*/ | ||
module.exports = escapeHtml; | ||
/** | ||
* Escape special characters in the given string of html. | ||
* | ||
* @param {String} html | ||
* @return {String} | ||
* @api private | ||
* @param {string} str The string to escape for inserting into HTML | ||
* @return {string} | ||
* @public | ||
*/ | ||
module.exports = function(html) { | ||
function escapeHtml(html) { | ||
return String(html) | ||
@@ -11,0 +24,0 @@ .replace(/&/g, '&') |
{ | ||
"name": "escape-html", | ||
"description": "Escape HTML entities", | ||
"version": "1.0.1", | ||
"keywords": ["escape", "html", "utility"], | ||
"dependencies": {}, | ||
"main": "index.js", | ||
"component": { | ||
"scripts": { | ||
"escape-html/index.js": "index.js" | ||
} | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/component/escape-html.git" | ||
} | ||
"version": "1.0.2", | ||
"license": "MIT", | ||
"keywords": [ | ||
"escape", | ||
"html", | ||
"utility" | ||
], | ||
"repository": "component/escape-html", | ||
"files": [ | ||
"LICENSE", | ||
"Readme.md", | ||
"index.js" | ||
] | ||
} |
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 License Found
License(Experimental) License information could not be found
Found 1 instance in 1 package
2002
0
4
1