Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

iso-8859-15

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iso-8859-15 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

54

iso-8859-15.js

@@ -1,20 +0,4 @@

/*! https://mths.be/iso-8859-15 v1.0.0 by @mathias | MIT license */
;(function(root) {
/*! https://mths.be/iso-8859-15 v1.0.1 by @mathias | MIT license */
;(function() {
// Detect free variables `exports`.
var freeExports = typeof exports == 'object' && exports;
// Detect free variable `module`.
var freeModule = typeof module == 'object' && module &&
module.exports == freeExports && module;
// Detect free variable `global`, from Node.js/io.js or Browserified code,
// and use it as `root`.
var freeGlobal = typeof global == 'object' && global;
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
root = freeGlobal;
}
/*--------------------------------------------------------------------------*/
var object = {};

@@ -36,3 +20,3 @@ var hasOwnProperty = object.hasOwnProperty;

// Else, `mode == 'fatal'`.
throw Error();
throw new Error();
};

@@ -117,5 +101,5 @@

var iso885915 = {
'encode': encode,
'decode': decode,
'labels': [
encode: encode,
decode: decode,
labels: [
'csisolatin9',

@@ -128,27 +112,7 @@ 'iso-8859-15',

],
'version': '1.0.0'
version: '1.0.1',
};
// Some AMD build optimizers, like r.js, check for specific condition patterns
// like the following:
if (
typeof define == 'function' &&
typeof define.amd == 'object' &&
define.amd
) {
define(function() {
return iso885915;
});
} else if (freeExports && !freeExports.nodeType) {
if (freeModule) { // in Node.js, io.js or RingoJS v0.8.0+
freeModule.exports = iso885915;
} else { // in Narwhal or RingoJS v0.7.0-
for (var key in iso885915) {
iso885915.hasOwnProperty(key) && (freeExports[key] = iso885915[key]);
}
}
} else { // in Rhino or a web browser
root.iso885915 = iso885915;
}
module.exports = iso885915;
}(this));
}());

16

package.json
{
"name": "iso-8859-15",
"version": "1.0.0",
"version": "1.0.1",
"description": "A robust iso-8859-15 encoder/decoder written in JavaScript.",

@@ -39,16 +39,10 @@ "homepage": "https://mths.be/iso-8859-15",

"build": "node scripts/transform-data.js",
"test": "node tests/tests.js"
"test": "node tests/tests.js",
"cover": "istanbul cover --report html --verbose --dir coverage tests/tests.js"
},
"devDependencies": {
"coveralls": "^2.11.6",
"grunt": "^0.4.5",
"grunt-shell": "^1.1.2",
"grunt-template": "^0.2.3",
"istanbul": "^0.4.2",
"jsesc": "^2.1.0",
"qunit-extras": "^1.4.5",
"qunitjs": "~1.11.0",
"requirejs": "^2.1.22",
"string.fromcodepoint": "^0.2.1"
"jsesc": "^3.0.2",
"lodash.template": "^4.5.0"
}
}

@@ -1,2 +0,2 @@

# iso-8859-15 [![Build status](https://travis-ci.org/mathiasbynens/iso-8859-15.svg?branch=master)](https://travis-ci.org/mathiasbynens/iso-8859-15) [![Code coverage status](https://coveralls.io/repos/mathiasbynens/iso-8859-15/badge.svg)](https://coveralls.io/r/mathiasbynens/iso-8859-15) [![Dependency status](https://gemnasium.com/mathiasbynens/iso-8859-15.svg)](https://gemnasium.com/mathiasbynens/iso-8859-15)
# iso-8859-15 [![Build status](https://github.com/mathiasbynens/iso-8859-15/workflows/run-checks/badge.svg)](https://github.com/mathiasbynens/iso-8859-15/actions?query=workflow%3Arun-checks) [![iso-8859-15 on npm](https://img.shields.io/npm/v/iso-8859-15)](https://www.npmjs.com/package/iso-8859-15)

@@ -21,30 +21,8 @@ _iso-8859-15_ is a robust JavaScript implementation of [the iso-8859-15 character encoding as defined by the Encoding Standard](https://encoding.spec.whatwg.org/#iso-8859-15).

In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/):
In [Node.js](https://nodejs.org/):
```js
var iso885915 = require('iso-8859-15');
const iso885915 = require('iso-8859-15');
```
In [Rhino](https://www.mozilla.org/rhino/):
```js
load('iso885915.js');
```
Using an AMD loader like [RequireJS](http://requirejs.org/):
```js
require(
{
'paths': {
'iso-8859-15': 'path/to/iso-8859-15'
}
},
['iso-8859-15'],
function(iso885915) {
console.log(iso885915);
}
);
```
## API

@@ -72,3 +50,3 @@

const encodedData = iso885915.encode(text, {
'mode': 'html'
mode: 'html'
});

@@ -91,3 +69,3 @@ // If `text` contains a symbol that cannot be represented in iso-8859-15,

const text = iso885915.decode(encodedData, {
'mode': 'fatal'
mode: 'fatal'
});

@@ -100,6 +78,2 @@ // If `encodedData` contains an invalid byte for the iso-8859-15 encoding,

## Support
_iso-8859-15_ is designed to work in at least Node.js v0.10.0, io.js v1.0.0, Narwhal 0.3.2, RingoJS 0.8-0.11, PhantomJS 1.9.0, Rhino 1.7RC4, as well as old and modern versions of Chrome, Firefox, Safari, Opera, Edge, and Internet Explorer.
## Notes

@@ -106,0 +80,0 @@

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