Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ion-js

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ion-js - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

CONTRIBUTE.md

5

dist/amd/es6/IonParserBinaryRaw.js

@@ -344,4 +344,7 @@ define(["require", "exports", "./IonBinary", "./IonDecimal", "./IonTypes", "./IonConstants", "./IonLongInt", "./IonPrecision", "./IonTimestamp"], function (require, exports, IonBinary, IonDecimal_1, IonTypes_1, IonConstants_1, IonLongInt_1, IonPrecision_1, IonTimestamp_1) {

break;
seconds = read_decimal_value(span, end - span.position());
seconds = read_var_unsigned_int(span);
precision = IonPrecision_1.Precision.SECONDS;
if (span.position() >= end)
break;
seconds += read_decimal_value(span, end - span.position());
break;

@@ -348,0 +351,0 @@ }

@@ -350,4 +350,7 @@ "use strict";

break;
seconds = read_decimal_value(span, end - span.position());
seconds = read_var_unsigned_int(span);
precision = IonPrecision_1.Precision.SECONDS;
if (span.position() >= end)
break;
seconds += read_decimal_value(span, end - span.position());
break;

@@ -354,0 +357,0 @@ }

2

package.json
{
"name": "ion-js",
"version": "1.1.0",
"version": "1.1.1",
"description": "A JavaScript implementation of the Ion data interchange format",

@@ -5,0 +5,0 @@ "main": "dist/commonjs/es6/Ion.js",

@@ -12,2 +12,13 @@ <p align="right">

# Table of Contents
* [About](#about)
* [Use](#use)
* [NPM](#npm)
* [Browser](#browser)
* [API](#api)
* [Contribute](#contribute)
* [License](#license)
* [Links](#links)
# About

@@ -25,33 +36,67 @@

# Download
# Use
The library is written in typescript and uses `npm` for its dependencies. Make sure you have the latest, stable, release
for [`npm`](https://nodejs.org/en/).
You can use ion-js either as a Node.js module or inside an html page.
1. Clone this repo
## NPM
1. Add `ion-js` to your dependencies using `npm`
```
git clone --recursive https://github.com/amzn/ion-js.git
npm install --save-dev ion-js
```
1. Use `npm` to install all dependencies
1. Use the library to read/write ion data. Here is an example that reads Ion data from a Javascript string
```javascript
var ionJs = require("ion-js")
var ionData = "{ hello: \"Ion\" }";
var ionReader = ionJs.makeReader(ionData);
ionReader.next();
ionReader.stepIn();
ionReader.next();
var hello = ionReader.fieldName();
var ion = ionReader.stringValue();
ionReader.stepOut();
console.log(ion.concat(", ").concat(hello));
```
npm install
```
1. We use [`grunt`](https://gruntjs.com/) for managing our build process, to see all of our build targets look at [`Gruntfile.js`](Gruntfile.js).
```
grunt all
```
Javascript code is generated under the folder `dist`.
Documentation is generated under the folder `doc` and is also available [online](https://amzn.github.io/ion-js/api/).
[Try it yourself](https://npm.runkit.com/ion-js).
## Browser
## Tests
You can include the Ion-js bundle (ES5 compatible) using the URLs
To debug the unit tests, use the following command:
* [ion-bundle.min.js](https://amzn.github.io/ion-js/browser/scripts/ion-bundle.min.js)
* [ion-bundle.js](https://amzn.github.io/ion-js/browser/scripts/ion-bundle.js)
These will create and initialize `window.ion` which has the exact API as our `npm` package. Here is an example
```html
<html>
<head>
<meta charset="UTF-8"/>
<script src="scripts/ion-bundle.min.js"></script>
<!-- more HTML/JS code that can now use `window.ion` to create/write Ion -->
</head>
</html>
```
node debug node_modules/intern/client config=tests/intern ionVersion=es6
```
## Browser
## API
To run Ion in a browser, see the example in the "browser" folder. You'll need to copy require.js and the Ion JavaScript files (Ion.js etc.) into the "scripts" folder.
[Ion JS API](https://amzn.github.io/ion-js/api/)
# Contribute
[CONTRIBUTE.md](CONTRIBUTE.md)
# License
[Apache License 2.0](LICENSE)
# Links
* [Ion](https://amzn.github.io/ion-docs/)
* [Ion Specification](https://amzn.github.io/ion-docs/spec.html)
* [Ion Cookbook](https://amzn.github.io/ion-docs/cookbook.html) uses the Java library for its examples.
* [Ion C](https://github.com/amzn/ion-c)
* [Ion Java](https://github.com/amzn/ion-java)
* [Ion Python](https://github.com/amzn/ion-python)

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc