Code Monkey home page Code Monkey logo

big-integer-max's Introduction

big-integer-max Version Badge

npm badge

Build Status dependency status dev dependency status

browser support

Given two valid integers in string form, return the larger of the two.

Example

var bigIntegerMax = require('big-integer-max');
var reallyBigInteger = '179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368';
var reallySmallInteger = '-' + reallyBigInteger;

// sync
assert.equal(bigIntegerMax('1', '2'), '2');
assert.equal(bigIntegerMax('-1', '2'), '2');
assert.equal(bigIntegerMax('1', reallyBigInteger), reallyBigInteger);
assert.equal(bigIntegerMax('-1', reallySmallInteger), '-1');

// async
bigIntegerMax('1', '2', function (error, max) {
	assert.equal(error, null); // this should never have an error
	assert.equal(max, '2');
});

Tests

Simply run npm test in the repo.

big-integer-max's People

Contributors

ljharb avatar yash-singh1 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

big-integer-max's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

An in-range update of auto-changelog is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency auto-changelog was updated from 1.16.2 to 1.16.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

auto-changelog is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Commits

The new version differs by 4 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • [Deps] Update Update eslint to v8.57.0
  • [Deps] Update Update eslint to v9
  • [Deps] Update Update nyc to v15
  • [Deps] Update Update actions/checkout action to v4
  • 🔐 Create all pending approval PRs at once 🔐

Detected dependencies

github-actions
.github/workflows/node-aught.yml
.github/workflows/node-pretest.yml
.github/workflows/node-tens.yml
.github/workflows/rebase.yml
  • actions/checkout v3
.github/workflows/require-allow-edits.yml
npm
package.json
  • is-callable ^1.2.7
  • just-next-tick ^0.0.0
  • @ljharb/eslint-config ^21.0.0
  • aud ^2.0.1
  • auto-changelog ^2.4.0
  • eslint =8.8.0
  • nyc ^10.3.2
  • safe-publish-latest ^2.0.0
  • tape ^5.6.1
  • node >= 0.4

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.