ion-js
ion-js copied to clipboard
A JavaScript implementation of Amazon Ion.
While the event stream tests are pretty exhaustive, `ion-js`'s unit test coverage is patchy at best. When event stream test failures occur, we don't always have an obvious set of...
Without a `close()` method, is the library potentially holding on to resources that could be released?
`-0b100` produces the error: Error: invalid character after number after inspection there is no logic around parsing binary numbers.
`12_34.56_78e0` produces the error: Error: invalid character after number After inspection there is no logic flow for skipping over underscores in the parser.
Once closed, a writer should no longer be usable. ```javascript let ion = require("../../dist/commonjs/es6/Ion.js"); let writer = ion.makeTextWriter(); writer.writeInt(1, ["false"]); writer.close(); console.log(ion.decodeUtf8(writer.getBytes())); writer.writeInt(1, ["1"]); writer.close(); console.log(ion.decodeUtf8(writer.getBytes())); ``` produces: ``` 'false'::1...
```javascript let reader = ion.makeReader('$1 $2 $3 $4 $5 $6 $7 $8 $9'); while (true) { let type = reader.next(); if (!type) break; console.log(reader.value()); } ``` produces: ``` $ion $ion_1_0...
Now that we include `JSBI` in the public API, we should add a `package-lock.json` to our npm package.
JavaScript tradition seems to be `throw Error`, but perhaps JavaScript/TypeScript provides some capabilities for defining custom error classes. Let's evaluate whether we should throw custom error classes for various error...
The browser distribution packages all code into a single module, which facilitates tighter controls over the public API. In contrast, the AMD and CommonJS distributions provide multiple modules (where each...