Skip to content

Commit fb50658

Browse files
committed
tweaks
1 parent 950e05a commit fb50658

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

LICENSE

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Copyright 2019 The MessagePack Community.
2+
3+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
4+
5+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
11
# MessagePack for JavaScript [![Build Status](https://travis-ci.org/msgpack/msgpack-javascript.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-javascript)
22

3+
This is the pure-JavaScript implementation of MessagePack:
4+
5+
https://msgpack.org/
6+
7+
## Usage
8+
39
TBD
10+
11+
## Install
12+
13+
```shell
14+
npm install @msgpack/msgpack
15+
```
16+
17+
## License
18+
19+
Copyright 2019 The MessagePack Community.
20+
21+
This software is licensed under the ISC license:
22+
23+
https://opensource.org/licenses/ISC
24+
25+
See [LICENSE](./LICENSE) for details.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"@types/mocha": "^5.2.6",
3333
"@types/node": "^11.13.8",
3434
"ieee754": "^1.1.13",
35-
"long": "^4.0.0",
3635
"mocha": "^6.1.4",
3736
"msgpack-lite": "^0.1.26",
3837
"msgpack-test-js": "^1.0.0",

src/utils/uf8Encode.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { prettyByte } from "./prettyByte";
22

3-
// USE_TEXT_ENOCDER is opt-in because NodeJS v12's impl is much slower than pure-JavaScript version (i.e. _utf8Encode).
4-
// Set `USE_TEXT_ENOCDER=true` to use TextEncoder.
5-
const USE_TEXT_ENCODER = (process.env.USE_TEXT_ENOCDER === 'true' && typeof TextEncoder !== "undefined");
3+
// Using TextEncoder is opt-in because NodeJS v12's impl is much slower than pure-JavaScript version (i.e. _utf8Encode).
4+
// Set `PREFER_TEXT_ENOCDER=true` to use TextEncoder if available.
5+
const USE_TEXT_ENCODER = (process.env.PREFER_TEXT_ENOCDER === 'true' && typeof TextEncoder !== "undefined");
66

77
function _utf8Encode(str: string): ReadonlyArray<number> {
88
const len = str.length;

0 commit comments

Comments
 (0)