DEPRECATED

Clone this repo:
  1. fb413ce Changing github.com/vanadium/docs links to vanadium.github.io by Ross Wang · 6 years ago master
  2. 8af3c05 TBR: js.core: Make all versions 'v23-0.1'. by Nicolas Lacasse · 6 years ago
  3. 97eb0bd Update vanadium.js to node 4.4.1 by Nicolas Lacasse · 6 years ago
  4. 277f82f v.io: use test.V23Init instead of v23.Init in test code by Bogdan Caprita · 6 years ago
  5. b4d1d9d js.core: Fix native type consts, and gen 0 values for all types. by Todd Wang · 6 years ago

Vanadium JavaScript

This repository defines the JavaScript API for Vanadium. The client and server APIs defined here work both in Node.js and the browser.

Install

npm install --save vanadium/js

Usage

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

Bugs and feature requests should be filed in the Vanadium issue tracker.

Building and testing

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