node-vector

0.0.1 • Public • Published

node-vector

An implementation of the C++ <vector> type in JavaScript.

usage

var Vector = require('node-vector');

var myVector = new Vector('number', [5, 6, 2, 6]);

myVector can now have most of the usual vector methods from C++ applied to it.

example method usage

myVector.empty() // boolean - is vector empty? myVector.size() // number - length of vector myVector.clear() // void - empty the vector

Obviously these are not all of the methods available. The full list can be seen in index.js, with explanations on cppreference

notes

  • i plan to write a test suite for this project.
  • as mentioned previously, not all vector methods are/can be implemented yet.

Dependents (0)

Package Sidebar

Install

npm i node-vector

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • joshhartigan