npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zigante

v2.1.1

Published

Use this package to help on your day by day.

Downloads

5

Readme

npm npm

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

Create the package.json file

First, create a directory where your application will live.

mkdir myproject
cd 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
import { mathOperations } from "zigante";

const sum = mathOperations.sum(5, 6, 7);

console.log(sum);

/** output:
 *  18
 */
//Example 02
import { mathOperations } from "zigante";

const bhaskara = mathOperations.bhaskara(1, 2, -3);

console.log(bhaskara);

/** 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
import { geoShapes } from "zigante";

const rectangle = geoShapes.rectangle(2, 3);

console.log(rectangle);

/** output:
 *  {
 *   area: 6,
 *   perimeter: 13,
 *   diagonal: 3.605551275463989,
 *   base: 2,
 *   height: 3
 *  }
 */
//Example 02
import { geoShapes, mathOperations } from "zigante";

const perimeter = mathOperations.round(geoShapes.triangle.rectangle(3, 5).perimeter, 5);

console.log(perimeter);

/** 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