Skip to content

Commit 52175eb

Browse files
committed
feat: v2.2.0
1 parent 5d76ce1 commit 52175eb

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ When the script is loaded, the object `Encoding` is defined in the global scope
121121
You can use encoding.js (package name: `encoding-japanese`) directly from a CDN via a script tag:
122122

123123
```html
124-
<script src="https://unpkg.com/encoding-japanese@2.1.0/encoding.min.js"></script>
124+
<script src="https://unpkg.com/encoding-japanese@2.2.0/encoding.min.js"></script>
125125
```
126126

127127
In this example we use [unpkg](https://unpkg.com/encoding-japanese/), but you can use any CDN that provides npm packages,

README_ja.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ minify された `encoding.min.js` も使用できます。
114114
`<script>` タグで CDN から直接 encoding.js (パッケージ名: `encoding-japanese`) を利用できます。
115115

116116
```html
117-
<script src="https://unpkg.com/encoding-japanese@2.1.0/encoding.min.js"></script>
117+
<script src="https://unpkg.com/encoding-japanese@2.2.0/encoding.min.js"></script>
118118
```
119119

120120
この例では [unpkg](https://unpkg.com/encoding-japanese/) を使用していますが、

encoding.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*!
2-
* encoding-japanese v2.1.0 - Convert and detect character encoding in JavaScript
2+
* encoding-japanese v2.2.0 - Convert and detect character encoding in JavaScript
33
* Copyright (c) 2012 polygonplanet <[email protected]>
44
* https://github.com/polygonplanet/encoding.js
55
* @license MIT
66
*/
77
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Encoding = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
88
module.exports={
9-
"version": "2.1.0"
9+
"version": "2.2.0"
1010
}
1111
},{}],2:[function(require,module,exports){
1212
var util = require('./util');
@@ -1825,6 +1825,8 @@ function handleFallback(results, bytes, fallbackOption) {
18251825
results[results.length] = 0x3B; // ;
18261826
}
18271827
break;
1828+
case 'error':
1829+
throw new Error('Character cannot be represented: [' + bytes.join(', ') + ']');
18281830
case 'ignore':
18291831
break;
18301832
}

encoding.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "encoding-japanese",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "Convert and detect character encoding in JavaScript",
55
"main": "src/index.js",
66
"files": [

0 commit comments

Comments
 (0)