JSPM

  • Created
  • Published
  • Downloads 17079
  • Score
    100M100P100Q133751F
  • License Apache-2.0

The official ArangoDB JavaScript driver.

Package Exports

  • arangojs
  • arangojs/lib/async/connection
  • arangojs/lib/async/error
  • arangojs/lib/async/util/btoa
  • arangojs/lib/async/util/joinPath
  • arangojs/lib/cjs/graph
  • arangojs/lib/cjs/index.js
  • arangojs/lib/cjs/util/btoa.js
  • arangojs/lib/cjs/util/btoa.web.js
  • arangojs/lib/cjs/util/bytelength.js
  • arangojs/lib/cjs/util/bytelength.web.js
  • arangojs/lib/cjs/util/joinPath.js
  • arangojs/lib/cjs/util/joinPath.web.js
  • arangojs/lib/cjs/util/multipart.js
  • arangojs/lib/cjs/util/multipart.web.js
  • arangojs/lib/cjs/util/request.js
  • arangojs/lib/cjs/util/request.web.js
  • arangojs/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arangojs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ArangoDB JavaScript Driver

The official ArangoDB low-level JavaScript client.

license - APACHE-2.0 Dependencies Build status

NPM status

js-standard-style

Install

With Yarn or NPM

yarn add arangojs
## - or -
npm install --save arangojs

From source

git clone https://github.com/arangodb/arangojs.git
cd arangojs
npm install
npm run dist

Basic usage example

// Modern JavaScript
import { Database, aql } from "arangojs";
const db = new Database();
(async function() {
  const now = Date.now();
  try {
    const cursor = await db.query(aql`RETURN ${now}`);
    const result = await cursor.next();
    // ...
  } catch (err) {
    // ...
  }
})();

// or plain old Node-style
var arangojs = require("arangojs");
var db = new arangojs.Database();
var now = Date.now();
db
  .query({
    query: "RETURN @value",
    bindVars: { value: now }
  })
  .then(function(cursor) {
    return cursor.next().then(function(result) {
      // ...
    });
  })
  .catch(function(err) {
    // ...
  });

Documentation

Latest Documentation

License

The Apache License, Version 2.0. For more information, see the accompanying LICENSE file.