commit | d9f15d9f3f9b2e9049bcff541c01f02d1ab9c3d3 | [log] [tgz] |
---|---|---|
author | Todd Wang <toddw@google.com> | Wed May 27 18:05:28 2015 -0700 |
committer | Todd Wang <toddw@google.com> | Wed May 27 18:05:28 2015 -0700 |
tree | 58b48518a45bc01bdc58ab8a3f1ed29a24b61c09 | |
parent | 70497f9cc6b3b93134dd121005741b2d318c1736 [diff] |
js.core: Fix bug in vom zero-struct-field encoding. This bug was reported by Adam Sadovsky. The bug occurs with the following example. type X struct { A any } The buggy code encodes X{false} the same as X{nil} - in general any value of the A field that is the zero value for its type is dropped. That's just wrong. The fix is in the encoder.canIgnoreField logic. In addition I noticed that we'd inadvertantly exposed too many methods from vom.Encoder. I've fixed that as well. Change-Id: Ibf1243acd16877f47765992d48480c06ac993a8f MultiPart: 3/3
This repository defines the JavaScript API for Vanadium. The client and server APIs defined here work both in Node.js and the browser.
npm
can be used to install this library:
npm install --save git@github.com:vanadium/js.git
Documentation for this API is available at https://jsdoc.v.io/ Tutorials can be found at https://v.io/tutorials/javascript/
The entry point to the API is through a module called vanadium
, everything else is considered private and should not be accessed by the users of the API.
The vanadium
module is exported as a global in the browser JavaScript library and for Browserify and Node.js the “main” property in the package.json
points to /src/vanadium
making it the index module and therefore Browserify and Node.js users can gain access to the API with:
var vanadium = require("vanadium");
One of the goals of this project is to only write the code once and have it run in both Node.js and browsers. Therefore, specific build and testing steps have been designed in the project to ensure this goal.
When run in a browser, vanadium.js
expects that the vanadium extension will be installed.
Bugs and feature requests should be filed in the Vanadium issue tracker.
GNU Make is used to build and test Vanadium.
Build everything:
make build
Test everything:
make test
Run a specific test suite:
make test-unit make test-unit-node make test-unit-browser make test-integration make test-integration-node make test-integration-browser
Remove all build and testing artifacts:
make clean