Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tecfu/is-multiple-of

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tecfu/is-multiple-of

Floating point modulus for javascript.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

is-multiple-of

Build Status NPM version Coverage Status

Floating point modulus operator functionality for javascript. Accurate to 16 digits and 6 decimal places.


Rationale

  • javascript can't divide floats accurately: i.e. 4.55 / .05 === 90.999999
4.55 % .05 === 0         // false

whereas:

multipleOf(4.55, .05)     // true

Installation

  • Node Module
$ npm install is-multiple-of
  • Browser
import multipleOf from 'https://cdn.jsdelivr.net/gh/tecfu/is-multiple-of/dist/is-multiple-of.esm.js'
let multipleOf = require('is-multiple-of')   // https://cdn.jsdelivr.net/gh/tecfu/is-multiple-of/dist/is-multiple-of.cjs.js
let multipleOf = IsMultipleOf;             // https://cdn.jsdelivr.net/gh/tecfu/is-multiple-of/dist/is-multiple-of.umd.js

Version Compatibility

Node VersionmultipleOf Version
8.0>= 1.0

Running tests

$ npm test

Pull Requests

Pull requests are encouraged!

  • Please remember to add a unit test when necessary
  • Please format your commit messages according to the "Conventional Commits" specification

If you aren't familiar with Conventional Commits, here's a good article on the topic

TL/DR:

  • feat: a feature that is visible for end users.
  • fix: a bugfix that is visible for end users.
  • chore: a change that doesn't impact end users (e.g. chances to CI pipeline)
  • docs: a change in the README or documentation
  • refactor: a change in production code focused on readability, style and/or performance.

License

MIT License

Copyright 2020, Tecfu.

Keywords

FAQs

Package last updated on 09 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc