stringbean
v0.3.0
Published
String helper methods that doesn't clobber the String prototype
Downloads
5
Readme
Stringbean
Stringbean is a collection of string helper methods that dont't clobber the String
prototype.
Installation
npm install stringbean
Usage
var stringbean = require('stringbean');
Methods
escapeHTML
Converts HTML tags to entities
var someString = "<script>XSS Baby!</script>";
console.log(stringbean.escapeHTML(someString));
<script>XSS Baby!</script>
removeNonAlphanumeric
Removes non alphanumeric characters from a string
var someString = "$£@@$%^foo(*&^%$£!@";
console.log(stringbean.removeNonAlphanumeric(testString));
foo