Started on node.js+socket.io+mongoDB on the backend for more responsivnes

This commit is contained in:
KasperRT
2015-04-09 00:18:13 +02:00
parent 076f8e821f
commit a8a705bd77
1889 changed files with 322175 additions and 68 deletions

View File

@@ -0,0 +1,2 @@
components
build

View File

@@ -0,0 +1,11 @@
build: components index.js
@component build
components:
@Component install
clean:
rm -fr build components template.js
.PHONY: clean

View File

@@ -0,0 +1,15 @@
# escape-html
Escape HTML entities
## Example
```js
var escape = require('escape-html');
escape(str);
```
## License
MIT

View File

@@ -0,0 +1,10 @@
{
"name": "escape-html",
"description": "Escape HTML entities",
"version": "1.0.1",
"keywords": ["escape", "html", "utility"],
"dependencies": {},
"scripts": [
"index.js"
]
}

View File

@@ -0,0 +1,16 @@
/**
* Escape special characters in the given string of html.
*
* @param {String} html
* @return {String}
* @api private
*/
module.exports = function(html) {
return String(html)
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}

View File

@@ -0,0 +1,46 @@
{
"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"
},
"bugs": {
"url": "https://github.com/component/escape-html/issues"
},
"homepage": "https://github.com/component/escape-html",
"_id": "escape-html@1.0.1",
"dist": {
"shasum": "181a286ead397a39a92857cfb1d43052e356bff0",
"tarball": "http://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz"
},
"_from": "escape-html@1.0.1",
"_npmVersion": "1.3.15",
"_npmUser": {
"name": "tjholowaychuk",
"email": "tj@vision-media.ca"
},
"maintainers": [
{
"name": "tjholowaychuk",
"email": "tj@vision-media.ca"
}
],
"directories": {},
"_shasum": "181a286ead397a39a92857cfb1d43052e356bff0",
"_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz",
"readme": "ERROR: No README data found!"
}