Description
The official Zigante driver for Node.js. Provides a high-level API with the most important and most used math operations and geometric shapes.
Zigante Node.JS Driver
The recommended way to get started using the Node.js 3.0 driver is by using the npm
(Node Package Manager) to install the dependency in your project.
Zigante Driver
Given that you have created your own project using npm init
we install the Zigante driver and its dependencies by executing the following npm
command.
npm install zigante --save
This will download the Zigante driver and add a dependency entry in your package.json
file.
You can also use the Yarn package manager.
Troubleshooting
The Zigante driver depends on other packages. These are:
Quick Start
package.json
file
Create the First, create a directory where your application will live.
mkdir myprojectcd myproject
Enter the following command and answer the questions to create the initial structure for your new project:
npm init
Next, install the driver dependency.
npm install zigante --save
You should see NPM download a lot of files. Once it's done you'll find all the downloaded packages under the node_modules directory.
Use Zigante
Create a new index.js file and add the following code to use the Zigante driver.
MathOperations
//Example 01; ; console.logsum; /** output: * 18 */
//Example 02; ; console.logbhaskara; /** output: * { * equation: '1x^2 + 2x + -3', * delta: 16, * x1: 1, * x2: -3, * solutions: [ 1, -3 ] * } */
Run your app from the command line with:
npm start
The application should print the operations result to the console.
GeoForms
//Example 01; ; console.logrectangle; /** output: * { * area: 6, * perimeter: 13, * diagonal: 3.605551275463989, * base: 2, * height: 3 * } */
//Example 02; const perimeter = mathOperations; console; /** output: * 13.83095 */
Run your app from the command line with:
npm start
The application should print the operations result to the console.
Next Steps
License
© 2012-present Pedro Zigante Martim © 2012-present ZIGANTE