New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-xdr

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-xdr - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

bower.json
{
"name": "xdr",
"name": "js-xdr",
"version": "0.0.1",

@@ -4,0 +4,0 @@ "private": false,

{
"name": "js-xdr",
"version": "0.0.1",
"version": "0.0.2",
"description": "Read/write XDR encoded data structures (RFC 4506)",

@@ -29,2 +29,3 @@ "main": "lib/index.js",

"gulp": "^3.8.11",
"gulp-babel": "^4.0.1",
"gulp-coveralls": "^0.1.3",

@@ -34,2 +35,3 @@ "gulp-git": "~0.5.3",

"gulp-load-plugins": "^0.9.0",
"gulp-mocha": "^2.0.1",
"gulp-plumber": "^1.0.0",

@@ -57,4 +59,2 @@ "gulp-rename": "~1.2.0",

"cursor": "^0.1.5",
"gulp-babel": "^4.0.1",
"gulp-mocha": "^2.0.1",
"lodash": "^3.5.0",

@@ -61,0 +61,0 @@ "long": "^2.2.3",

@@ -6,5 +6,20 @@ # XDR, for Javascript

[![Travis build status](http://img.shields.io/travis/stellar/js-xdr.svg?style=flat)](https://travis-ci.org/stellar/js-xdr)
[![Code Climate](https://codeclimate.com/github/stellar/js-xdr/badges/gpa.svg)](https://codeclimate.com/github/stellar/js-xdr)
[![Test Coverage](https://codeclimate.com/github/stellar/js-xdr/badges/coverage.svg)](https://codeclimate.com/github/stellar/js-xdr)
[![Dependency Status](https://david-dm.org/stellar/js-xdr.svg)](https://david-dm.org/stellar/js-xdr)
[![devDependency Status](https://david-dm.org/stellar/js-xdr/dev-status.svg)](https://david-dm.org/stellar/js-xdr#info=devDependencies)
XDR is an open data format, specified in [RFC 4506](http://tools.ietf.org/html/rfc4506.html). This library provides a way to read and write XDR data from javascript. It can read/write all of the primitive XDR types and also provides facilities to define readers for the compound XDR types (enums, structs and unions)
## Caveats
There are a couple of caveats to be aware of with this library:
1. We do not support quadruple precision floating point values. Attempting to read or write these values will throw errors.
2. NaN is not handled perfectly for floats and doubles. There are several forms of NaN as defined by IEEE754 and the browser polyfill for node's Buffer class seems to handle them poorly.
## Code generation
js-xdr by itself does not have any ability to parse XDR IDL files and produce a parser for your custom data types. Instead, that is the responsibility of [xdrgen](http://github.com/stellar/xdrgen). xdrgen will take your .x files and produce a javascript file that target this library to allow for your own custom types.
See [js-stellar-base](http://github.com/stellar/js-stellar-base) for an example (check out the src/generated directory)
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