discrete-math

0.0.1 • Public • Published

npm Node.js CI

discrete-math

A JavaScript library focused on providing functions and utilities for discrete mathematics operations.

Installation

To install discrete-math, use npm:

npm install discrete-math

Usage

import { difference } from 'discrete-math/set';

Set

This module provides functions for set operations.

difference(setA, setB)

Returns the difference between two sets or arrays. The difference is the set of elements that belong to setA but not to setB.

Parameters:

  • setA (Set|Array): The first set or array.
  • setB (Set|Array): The second set or array, from which elements will be subtracted.

Return: A new set containing elements that are in 'setA' but not in 'setB'.

Example:

const setA = [1, 2, 3];
const setB = [1, 3];

console.log(difference(setA, setB)); // Outputs: Set { 2 }

Contribute

Contributions are always welcome! Please ensure that you adhere to the established coding standards and provide tests for any new or changed functionality.

If you find any bugs or have a feature request, please open an issue on GitHub.

/discrete-math/

    Package Sidebar

    Install

    npm i discrete-math

    Weekly Downloads

    4

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    7.73 kB

    Total Files

    12

    Last publish

    Collaborators

    • jesselpalmer