mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-03 21:40:53 +00:00
nhj
more
This commit is contained in:
162
unified-ai-platform/node_modules/iconv-lite/Changelog.md
generated
vendored
Normal file
162
unified-ai-platform/node_modules/iconv-lite/Changelog.md
generated
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
# 0.4.24 / 2018-08-22
|
||||
|
||||
* Added MIK encoding (#196, by @Ivan-Kalatchev)
|
||||
|
||||
|
||||
# 0.4.23 / 2018-05-07
|
||||
|
||||
* Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann)
|
||||
* Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn)
|
||||
|
||||
|
||||
# 0.4.22 / 2018-05-05
|
||||
|
||||
* Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson)
|
||||
* Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson)
|
||||
|
||||
|
||||
# 0.4.21 / 2018-04-06
|
||||
|
||||
* Fix encoding canonicalization (#156)
|
||||
* Fix the paths in the "browser" field in package.json (#174 by @LMLB)
|
||||
* Removed "contributors" section in package.json - see Git history instead.
|
||||
|
||||
|
||||
# 0.4.20 / 2018-04-06
|
||||
|
||||
* Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR)
|
||||
|
||||
|
||||
# 0.4.19 / 2017-09-09
|
||||
|
||||
* Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147)
|
||||
* Re-generated windows1255 codec, because it was updated in iconv project
|
||||
* Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8
|
||||
|
||||
|
||||
# 0.4.18 / 2017-06-13
|
||||
|
||||
* Fixed CESU-8 regression in Node v8.
|
||||
|
||||
|
||||
# 0.4.17 / 2017-04-22
|
||||
|
||||
* Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn)
|
||||
|
||||
|
||||
# 0.4.16 / 2017-04-22
|
||||
|
||||
* Added support for React Native (#150)
|
||||
* Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex)
|
||||
* Fixed typo in Readme (#138 by @jiangzhuo)
|
||||
* Fixed build for Node v6.10+ by making correct version comparison
|
||||
* Added a warning if iconv-lite is loaded not as utf-8 (see #142)
|
||||
|
||||
|
||||
# 0.4.15 / 2016-11-21
|
||||
|
||||
* Fixed typescript type definition (#137)
|
||||
|
||||
|
||||
# 0.4.14 / 2016-11-20
|
||||
|
||||
* Preparation for v1.0
|
||||
* Added Node v6 and latest Node versions to Travis CI test rig
|
||||
* Deprecated Node v0.8 support
|
||||
* Typescript typings (@larssn)
|
||||
* Fix encoding of Euro character in GB 18030 (inspired by @lygstate)
|
||||
* Add ms prefix to dbcs windows encodings (@rokoroku)
|
||||
|
||||
|
||||
# 0.4.13 / 2015-10-01
|
||||
|
||||
* Fix silly mistake in deprecation notice.
|
||||
|
||||
|
||||
# 0.4.12 / 2015-09-26
|
||||
|
||||
* Node v4 support:
|
||||
* Added CESU-8 decoding (#106)
|
||||
* Added deprecation notice for `extendNodeEncodings`
|
||||
* Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol)
|
||||
|
||||
|
||||
# 0.4.11 / 2015-07-03
|
||||
|
||||
* Added CESU-8 encoding.
|
||||
|
||||
|
||||
# 0.4.10 / 2015-05-26
|
||||
|
||||
* Changed UTF-16 endianness heuristic to take into account any ASCII chars, not
|
||||
just spaces. This should minimize the importance of "default" endianness.
|
||||
|
||||
|
||||
# 0.4.9 / 2015-05-24
|
||||
|
||||
* Streamlined BOM handling: strip BOM by default, add BOM when encoding if
|
||||
addBOM: true. Added docs to Readme.
|
||||
* UTF16 now uses UTF16-LE by default.
|
||||
* Fixed minor issue with big5 encoding.
|
||||
* Added io.js testing on Travis; updated node-iconv version to test against.
|
||||
Now we just skip testing SBCS encodings that node-iconv doesn't support.
|
||||
* (internal refactoring) Updated codec interface to use classes.
|
||||
* Use strict mode in all files.
|
||||
|
||||
|
||||
# 0.4.8 / 2015-04-14
|
||||
|
||||
* added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94)
|
||||
|
||||
|
||||
# 0.4.7 / 2015-02-05
|
||||
|
||||
* stop official support of Node.js v0.8. Should still work, but no guarantees.
|
||||
reason: Packages needed for testing are hard to get on Travis CI.
|
||||
* work in environment where Object.prototype is monkey patched with enumerable
|
||||
props (#89).
|
||||
|
||||
|
||||
# 0.4.6 / 2015-01-12
|
||||
|
||||
* fix rare aliases of single-byte encodings (thanks @mscdex)
|
||||
* double the timeout for dbcs tests to make them less flaky on travis
|
||||
|
||||
|
||||
# 0.4.5 / 2014-11-20
|
||||
|
||||
* fix windows-31j and x-sjis encoding support (@nleush)
|
||||
* minor fix: undefined variable reference when internal error happens
|
||||
|
||||
|
||||
# 0.4.4 / 2014-07-16
|
||||
|
||||
* added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3)
|
||||
* fixed streaming base64 encoding
|
||||
|
||||
|
||||
# 0.4.3 / 2014-06-14
|
||||
|
||||
* added encodings UTF-16BE and UTF-16 with BOM
|
||||
|
||||
|
||||
# 0.4.2 / 2014-06-12
|
||||
|
||||
* don't throw exception if `extendNodeEncodings()` is called more than once
|
||||
|
||||
|
||||
# 0.4.1 / 2014-06-11
|
||||
|
||||
* codepage 808 added
|
||||
|
||||
|
||||
# 0.4.0 / 2014-06-10
|
||||
|
||||
* code is rewritten from scratch
|
||||
* all widespread encodings are supported
|
||||
* streaming interface added
|
||||
* browserify compatibility added
|
||||
* (optional) extend core primitive encodings to make usage even simpler
|
||||
* moved from vows to mocha as the testing framework
|
||||
|
||||
|
||||
21
unified-ai-platform/node_modules/iconv-lite/LICENSE
generated
vendored
Normal file
21
unified-ai-platform/node_modules/iconv-lite/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2011 Alexander Shtuchkin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
156
unified-ai-platform/node_modules/iconv-lite/README.md
generated
vendored
Normal file
156
unified-ai-platform/node_modules/iconv-lite/README.md
generated
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
## Pure JS character encoding conversion [](https://travis-ci.org/ashtuchkin/iconv-lite)
|
||||
|
||||
* Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io).
|
||||
* Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser),
|
||||
[Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others.
|
||||
* Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison).
|
||||
* Intuitive encode/decode API
|
||||
* Streaming support for Node v0.10+
|
||||
* [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings.
|
||||
* In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included).
|
||||
* Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included.
|
||||
* React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`).
|
||||
* License: MIT.
|
||||
|
||||
[](https://npmjs.org/packages/iconv-lite/)
|
||||
|
||||
## Usage
|
||||
### Basic API
|
||||
```javascript
|
||||
var iconv = require('iconv-lite');
|
||||
|
||||
// Convert from an encoded buffer to js string.
|
||||
str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251');
|
||||
|
||||
// Convert from js string to an encoded buffer.
|
||||
buf = iconv.encode("Sample input string", 'win1251');
|
||||
|
||||
// Check if encoding is supported
|
||||
iconv.encodingExists("us-ascii")
|
||||
```
|
||||
|
||||
### Streaming API (Node v0.10+)
|
||||
```javascript
|
||||
|
||||
// Decode stream (from binary stream to js strings)
|
||||
http.createServer(function(req, res) {
|
||||
var converterStream = iconv.decodeStream('win1251');
|
||||
req.pipe(converterStream);
|
||||
|
||||
converterStream.on('data', function(str) {
|
||||
console.log(str); // Do something with decoded strings, chunk-by-chunk.
|
||||
});
|
||||
});
|
||||
|
||||
// Convert encoding streaming example
|
||||
fs.createReadStream('file-in-win1251.txt')
|
||||
.pipe(iconv.decodeStream('win1251'))
|
||||
.pipe(iconv.encodeStream('ucs2'))
|
||||
.pipe(fs.createWriteStream('file-in-ucs2.txt'));
|
||||
|
||||
// Sugar: all encode/decode streams have .collect(cb) method to accumulate data.
|
||||
http.createServer(function(req, res) {
|
||||
req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) {
|
||||
assert(typeof body == 'string');
|
||||
console.log(body); // full request body string
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### [Deprecated] Extend Node.js own encodings
|
||||
> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility).
|
||||
|
||||
```javascript
|
||||
// After this call all Node basic primitives will understand iconv-lite encodings.
|
||||
iconv.extendNodeEncodings();
|
||||
|
||||
// Examples:
|
||||
buf = new Buffer(str, 'win1251');
|
||||
buf.write(str, 'gbk');
|
||||
str = buf.toString('latin1');
|
||||
assert(Buffer.isEncoding('iso-8859-15'));
|
||||
Buffer.byteLength(str, 'us-ascii');
|
||||
|
||||
http.createServer(function(req, res) {
|
||||
req.setEncoding('big5');
|
||||
req.collect(function(err, body) {
|
||||
console.log(body);
|
||||
});
|
||||
});
|
||||
|
||||
fs.createReadStream("file.txt", "shift_jis");
|
||||
|
||||
// External modules are also supported (if they use Node primitives, which they probably do).
|
||||
request = require('request');
|
||||
request({
|
||||
url: "http://github.com/",
|
||||
encoding: "cp932"
|
||||
});
|
||||
|
||||
// To remove extensions
|
||||
iconv.undoExtendNodeEncodings();
|
||||
```
|
||||
|
||||
## Supported encodings
|
||||
|
||||
* All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex.
|
||||
* Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap.
|
||||
* All widespread singlebyte encodings: Windows 125x family, ISO-8859 family,
|
||||
IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library.
|
||||
Aliases like 'latin1', 'us-ascii' also supported.
|
||||
* All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP.
|
||||
|
||||
See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings).
|
||||
|
||||
Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors!
|
||||
|
||||
Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors!
|
||||
|
||||
|
||||
## Encoding/decoding speed
|
||||
|
||||
Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0).
|
||||
Note: your results may vary, so please always check on your hardware.
|
||||
|
||||
operation iconv@2.1.4 iconv-lite@0.4.7
|
||||
----------------------------------------------------------
|
||||
encode('win1251') ~96 Mb/s ~320 Mb/s
|
||||
decode('win1251') ~95 Mb/s ~246 Mb/s
|
||||
|
||||
## BOM handling
|
||||
|
||||
* Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options
|
||||
(f.ex. `iconv.decode(buf, enc, {stripBOM: false})`).
|
||||
A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found.
|
||||
* If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module.
|
||||
* Encoding: No BOM added, unless overridden by `addBOM: true` option.
|
||||
|
||||
## UTF-16 Encodings
|
||||
|
||||
This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be
|
||||
smart about endianness in the following ways:
|
||||
* Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be
|
||||
overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`.
|
||||
* Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override.
|
||||
|
||||
## Other notes
|
||||
|
||||
When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding).
|
||||
Untranslatable characters are set to <20> or ?. No transliteration is currently supported.
|
||||
Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77).
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
$ git clone git@github.com:ashtuchkin/iconv-lite.git
|
||||
$ cd iconv-lite
|
||||
$ npm install
|
||||
$ npm test
|
||||
|
||||
$ # To view performance:
|
||||
$ node test/performance.js
|
||||
|
||||
$ # To view test coverage:
|
||||
$ npm run coverage
|
||||
$ open coverage/lcov-report/index.html
|
||||
```
|
||||
46
unified-ai-platform/node_modules/iconv-lite/package.json
generated
vendored
Normal file
46
unified-ai-platform/node_modules/iconv-lite/package.json
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "iconv-lite",
|
||||
"description": "Convert character encodings in pure javascript.",
|
||||
"version": "0.4.24",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"iconv",
|
||||
"convert",
|
||||
"charset",
|
||||
"icu"
|
||||
],
|
||||
"author": "Alexander Shtuchkin <ashtuchkin@gmail.com>",
|
||||
"main": "./lib/index.js",
|
||||
"typings": "./lib/index.d.ts",
|
||||
"homepage": "https://github.com/ashtuchkin/iconv-lite",
|
||||
"bugs": "https://github.com/ashtuchkin/iconv-lite/issues",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/ashtuchkin/iconv-lite.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "istanbul cover _mocha -- --grep .",
|
||||
"coverage-open": "open coverage/lcov-report/index.html",
|
||||
"test": "mocha --reporter spec --grep ."
|
||||
},
|
||||
"browser": {
|
||||
"./lib/extend-node": false,
|
||||
"./lib/streams": false
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^3.1.0",
|
||||
"request": "~2.87.0",
|
||||
"unorm": "*",
|
||||
"errto": "*",
|
||||
"async": "*",
|
||||
"istanbul": "*",
|
||||
"semver": "*",
|
||||
"iconv": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user