Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fun-gcd

zubayerhimel6MIT1.0.5

Get Greatest Common Divisor (GCD) using Euclidean Algorithm.

gcd, euclidean algorithm

readme

Get Greatest Common Divisor (GCD) using Euclidean Algorithm.

Install

npm i fun-gcd

Usage

// es5
const eq = require("fun-gcd");

// es6
import eq from "fun-gcd";

console.log(eq.gcdOfTwo(2, 3));
// => 1

console.log(eq.gcdOfTwo(7, 77));
// => 7