Skip to content

Commit

Permalink
Merge pull request #26 from TheAkio/qol-updates
Browse files Browse the repository at this point in the history
JavaScript Quality of Life updates
  • Loading branch information
zorkian committed Oct 26, 2019
2 parents bb4bcb1 + c67873d commit 5d0064f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/py/
/ex/
/build/
/js/__tests__/
.travis.yml
MANIFEST.in
mix.exs
pytest.ini
setup.cfg
setup.py
.gitattributes
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Erlpack

Erlpack is a fast encoder and decoder for the Erlang Term Format (version 131) for Python and Javascript.
Erlpack is a fast encoder and decoder for the Erlang Term Format (version 131) for Python and JavaScript.

# Javascript
# JavaScript

## Things that can be packed:

Expand Down Expand Up @@ -65,7 +65,7 @@ v8::Local<v8::Value> ConvertToNodeBuffer(const v8::Local<v8::Object>& blinkArray
}
```
Then in Javascript something like:
Then in JavaScript something like:
```js
let packed = NativeUtils.convertToNodeBuffer(new Uint8Array(binaryPayload));
Expand Down Expand Up @@ -148,4 +148,4 @@ class User(object):

u = User(name='Jake', age=23)
packed = pack(u)
```
```
4 changes: 4 additions & 0 deletions js/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module 'erlpack' {
export function pack(data: any): Buffer;
export function unpack(data: Buffer): any;
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"main": "./js/index.js",
"types": "./js/index.d.ts",
"name": "erlpack",
"version": "0.1.3",
"description": "Erlpack is a fast encoder and decoder for the Erlang Term Format (version 131) for Javascript",
"description": "Erlpack is a fast encoder and decoder for the Erlang Term Format (version 131) for JavaScript",
"scripts": {
"test": "jest"
},
"author": "Jason Citron",
"license": "Apache-2.0",
"license": "MIT",
"dependencies": {
"bindings": "^1.5.0",
"nan": "^2.14.0"
},
"gypfile": true,
"devDependencies": {
"@types/node": "^12.11.7",
"jest-cli": "^24.9.0"
},
"jest": {
Expand Down

0 comments on commit 5d0064f

Please sign in to comment.