New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

entity-convert

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

entity-convert - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.jshintrc

16

package.json
{
"name": "entity-convert",
"version": "0.0.3",
"version": "0.0.4",
"description": "convert all special characters in a string to their corresponding HTML and CSS entities",

@@ -8,4 +8,9 @@ "main": "entityconvert.js",

"homepage": "https://github.com/m90/entity-convert",
"scripts": {
"pretest": "node node_modules/jshint/bin/jshint entityconvert.js",
"test": "node node_modules/mocha/bin/mocha test.js",
"posttest": "node node_modules/uglify-js/bin/uglifyjs entityconvert.js > entityconvert.min.js --mangle"
},
"bugs": {
"url" : "https://github.com/m90/entity-convert/issues"
"url": "https://github.com/m90/entity-convert/issues"
},

@@ -19,3 +24,8 @@ "keywords": [

"author": "Frederik Ring",
"license": "MIT"
"license": "MIT",
"devDependencies": {
"jshint": "^2.5.5",
"mocha": "*",
"uglify-js": "^2.4.15"
}
}

21

README.md
# entityconvert.js
#### convert special characters in a string to their HTML or CSS charcode entities (useful for build tools et. al.)
The module works as AMD or CommonJS module and exports an Object containing two functions: `.html(str)` and `.css(str)`. In a non-AMD or CommonJS environment `window.entityconvert` will be exported.
The module works as AMD or CommonJS module and exports an Object exposing two methods: `.html(string)` and `.css(string)`. In a non-AMD and non-CommonJS environment `.entityconvert` will be attached to the global object.
AMD usage like:
AMD usage:
```javascript
require(['entityconvert'], function(entityconvert){
var converted = entityconvert.html('We äll löve Ümläutß!');
// => We äll löve Ümläutß!
var converted = entityconvert.html('We äll löve Ümläutß!');
// => We äll löve Ümläutß!
});
```
CommonJS usage like:
CommonJS usage:
```javascript

@@ -21,2 +21,11 @@ var entityconvert = require('entity-convert');

Script tag usage:
```html
<script src="entityconvert.js"></script>
<script>
var converted = entityconvert.html('Yäy!');
// => Y&#228;y!
</script>
```
Available via npm:

@@ -28,2 +37,2 @@ ```sh

##License
MIT © [Frederik Ring](https://github.com/m90)
MIT © [Frederik Ring](http://www.frederikring.com)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc