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

kam-utils1000

v1.0.7

Published

A simple lighweight utility package offering essential tools for date formatting, string manipulation, object handling, and more to streamline development tasks.

Downloads

4

Readme

Kam Utils 1000

Overview

Welcome to your package! This package provides a collection of useful functions for various tasks, including array manipulation, date formatting, string operations, number calculations, and object handling. Below is a brief overview of the main functions included in this package:

Functions

  1. Array Functions

    • chunk: Divides an array into smaller arrays of a specified size.
    • randomItem: Returns a random item from an array.
  2. Date Functions

    • formatDate: Formats a date object into a string based on a specified format.
    • daysBetween: Calculates the number of days between two dates.
  3. String Manipulation Functions

    • replaceAll: Replaces all occurrences of a search string with a replace string.
    • removeUnderscores: Replaces underscores with spaces in a string.
    • formatUrl: Decodes a URL string.
  4. Number Functions

    • roundNum: Rounds a number to a specified number of decimal places.
    • clampNum: Clamps a number between a minimum and maximum value.
    • percentageNum: Calculates the percentage of a number.
    • absoluteNum: Calculates the absolute value of a number.
  5. Object Functions

    • keys: Returns an array of keys in an object.
    • values: Returns an array of values in an object.
    • mergeObj: Merges two objects into a new object.

Installation

To install the kam-utils1000 package, you can use the following command:

npm i kam-utils1000

This command will fetch and install the kam-utils1000 package from the npm package registry, making it available for use in your project.

Usage

To use this package, simply import the desired functions from the respective files into your project. For example:

import { chunk, formatDate, capitalize } from "kam-utils1000/array.ts";
import { roundNum, clampNum } from "kam-utils1000/number.ts";

// or the entire functions
import { firmatDate, roundNum } from "kam-utils1000";

Contribution

If you find any issues or have suggestions for improvements, feel free to contribute by forking the repository and submitting a pull request.

License

This package is licensed under the MIT License. Feel free to use and modify it according to your needs.

Thank you for using your package! If you have any questions or need further assistance, please don't hesitate to reach out.