npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lbplayground/gitlab-math-utils-oidc-test

v1.0.4

Published

A simple math utilities library for testing OIDC trusted publishers with GitLab CI

Readme

GitLab Math Utils OIDC Test

A comprehensive math utilities library for testing OIDC trusted publishers with GitLab CI and npm.

Features

  • Calculator: Basic arithmetic operations (add, subtract, multiply, divide, power, square root)
  • Statistics: Statistical functions (mean, median, mode, standard deviation, min, max)
  • Constants: Mathematical constants and conversion utilities
  • ES Modules: Full ES module support
  • Comprehensive Tests: Complete test suite with validation

Installation

npm install @lbplayground/gitlab-math-utils-oidc-test

Usage

Quick Start

import MathUtils from '@lbplayground/gitlab-math-utils-oidc-test';

const mathUtils = new MathUtils();

// Calculator operations
console.log(mathUtils.calculator.add(5, 3)); // 8
console.log(mathUtils.calculator.power(2, 3)); // 8

// Statistics
const data = [1, 2, 3, 4, 5];
console.log(mathUtils.statistics.mean(data)); // 3
console.log(mathUtils.statistics.standardDeviation(data)); // ~1.58

// Constants
console.log(mathUtils.constants.PI); // 3.14159...
console.log(mathUtils.constants.degreesToRadians(90)); // π/2

Individual Imports

import { Calculator, Statistics, MathConstants } from '@lbplayground/gitlab-math-utils-oidc-test';

const calc = new Calculator();
const stats = new Statistics();

// Use individual components
const sum = calc.add(10, 20);
const average = stats.mean([1, 2, 3, 4, 5]);
const piValue = MathConstants.PI;

Calculator Operations

import { Calculator } from '@your-org/gitlab-math-utils-oidc-test';

const calc = new Calculator();

calc.add(a, b)           // Addition
calc.subtract(a, b)      // Subtraction
calc.multiply(a, b)      // Multiplication
calc.divide(a, b)        // Division
calc.power(base, exp)    // Exponentiation
calc.sqrt(num)           // Square root

Statistical Functions

import { Statistics } from '@lbplayground/gitlab-math-utils-oidc-test';

const stats = new Statistics();
const data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

stats.mean(data)               // Average
stats.median(data)             // Middle value
stats.mode(data)               // Most frequent value(s)
stats.standardDeviation(data)  // Standard deviation
stats.min(data)                // Minimum value
stats.max(data)                // Maximum value

Mathematical Constants

import { MathConstants } from '@lbplayground/gitlab-math-utils-oidc-test';

// Built-in constants
MathConstants.PI              // π
MathConstants.E               // Euler's number
MathConstants.GOLDEN_RATIO    // Golden ratio

// Conversion utilities
MathConstants.degreesToRadians(90)    // Convert 90° to radians
MathConstants.radiansToDegrees(π)     // Convert π radians to degrees

Development

# Install dependencies
npm install

# Run tests
npm test

# Run demo
npm run demo

# Start CLI
npm start

Command Line Interface

# Basic package info
npx @lbplayground/gitlab-math-utils-oidc-test

# Run interactive demo
npx @lbplayground/gitlab-math-utils-oidc-test demo

OIDC Testing

This package is specifically designed for testing OIDC trusted publishers with:

  • GitLab CI/CD pipelines
  • npm package publishing with provenance
  • Trusted publisher authentication workflows

Error Handling

All functions include comprehensive input validation:

  • Type checking for numbers and arrays
  • Range validation (e.g., no negative square roots)
  • Division by zero protection
  • Empty array handling

License

MIT

Contributing

This package is for OIDC testing purposes. For production math utilities, consider using established libraries like Lodash or Math.js.