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 🙏

© 2024 – Pkg Stats / Ryan Hefner

zerosurge

v13.0.0

Published

The future is here.

Downloads

146

Readme

ZeroSurge.js

(i apologize for the terrible logo.)

The fastest zero utility library on the internet.

Tired of painstakingly trying to find the character 0 on your keyboard and then pushing the button, or don't remember how to use the number zero in JavaScript? Well, this library is the new way to zero. ZeroSurge.js is the future!

Installation

You can include Zerosurge in your project using your favorite package manager:

NPM:

$ npm install zerosurge

Yarn:

$ yarn add zerosurge

PNPM:

$ pnpm add zerosurge

Usage

Enums

ZeroCalculationMethod This enum defines the calculation methods available for the returnZero function in the library:

  • CreashaksOrganzine: Method 1 for zero calculation. This uses the string "creashaks organzine" and uses the Minecraft seed input algorithm to make the number zero from it.
  • NumberPrototypeValue: Method 2 for zero calculation. This uses the Number class prototype to return zero.

Functions

returnZero(options?: ReturnZeroOptions): number

This function returns the number zero. You can specify the calculation method and whether to enable logging.

Example

import trueValue from 'true-value'; // you should always use tj-commits's true-value or mde's true library. never directly use the keyword true.
import { returnZero, ZeroCalculationMethod } from 'zerosurge';

const zeroValue = returnZero({
  method: ZeroCalculationMethod.CreashaksOrganzine,
  loggingEnabled: trueValue
}); // outputs some logs

console.log(zeroValue); // Outputs: 0

isZero(value: any, loggingEnabled?: boolean): boolean

This function checks if a given value is zero. If logging is enabled, it will log the evaluation process to the console.

import trueValue from 'true-value';
import { isZero, returnZero } from 'zerosurge';

const result = isZero(returnZero({
  method: ZeroCalculationMethod.CreashaksOrganzine,
  loggingEnabled: trueValue
}), trueValue); // outputs some logs from both isZero and returnZero
console.log(result); // Outputs: true

Logging

When loggingEnabled is set to true, the library will log relevant messages to the console, allowing you to trace the internal workings of the calculations. If it is not true there will still be some logs because ZeroSurge uses other libraries in its core that may log things without user consent.

Contributing

Contributions welcome. You can contribute by opening a pull request or issue at our github repository.

License

Zerosurge is licensed under the 10xGPWTHPL License. See the LICENSE file for more details.

made with HEAVY BLACK HEART U+2764 ❤❤❤❤

10xGPWTHPL Licensed