JSPM

isdivisibleby

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q34312F
  • License ISC

Checks divisibility of two lists of numbers

Package Exports

  • isdivisibleby

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (isdivisibleby) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

isDivisibleBy

Checks divisibility of one or many lists of numbers.

Install

npm i --save isdivisibleby

Usage

const isDivisibleBy = require('isdivisibleby');

//isDivisibleBy(...divisors)(...dividends);

isDivisibleBy([5,10])([10,20,30]) //true
isDivisibleBy([5,10])([10,20,21]) //false


isDivisibleBy(5,10)(10,20,30) //true
isDivisibleBy(5,10)(10,20,21) //false


//It works with most input types
isDivisibleBy([5],[15])([15],[30,45]) //true
isDivisibleBy([5],[15])([15],[30,43]) //false
isDivisibleBy([[5],[15]])([[15],[30,45]]) //true
isDivisibleBy([[5],[15]])([[15],[30,43]]) //false
isDivisibleBy([])([]) //false
isDivisibleBy(['a'])(['b']) //false


const divisibleBy3and5 = isDivisibleBy(3,5);
divisibleBy3and5(15,30); //true