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

mcm-utils

v1.0.8

Published

A collection of utility functions and pipes for Angular

Readme

**MCM UTILS by MyCodedMind ** 🎉

A powerful and lightweight utility library for Angular applications.

npm version MIT license


🚀 Overview

MCM UTILS is a collection of essential utility functions designed to simplify common tasks in Angular applications. Whether you need to manipulate arrays, format dates, or perform other operations, this library has you covered.

Features

  • 🔧 Handy functions for everyday Angular development.
  • 📦 Lightweight with no extra dependencies.
  • 🛡️ Fully tested and optimized for Angular 18.

📦 Installation

To install the library, use npm:

npm install mcm-utils

🛠️ Usage

Import the utilities you need and use them in your Angular project:

import { capitalize, arrayToString } from 'mcm-utils';

console.log(capitalize(maria)); // Marias
console.log(arrayToString(['h',"e","l","l","o"])); // "hello"

📚 Available Utilities

String Utilities

Collection of functions for string manipulation and formatting.

replaceAccents(value: string): string

Replaces Spanish accents in a string with their non-accented equivalents.

import { replaceAccents } from 'mcm-utils-strings';
// Output: "Hello, World!"
const result = replaceAccents("Hélló, Wórld!");

removeAccents(value: string): string

Removes all diacritical marks from characters using Unicode normalization.

import { removeAccents } from './mcm-utils-strings';
// Output: "Hello, World!"
const result = removeAccents("Hélló, Wórld!");

removeLineJumps(value: string): string

import { removeLineJumps } from 'mcm-util-strings';
// Output: "Hello, World!"
const result = removeLineJumps("Hello,\nWorld!");

convertToSlug(value: string): string

Converts a string to a URL-friendly slug by removing accents, line breaks, and special characters.

import { convertToSlug } from 'mcm-util-strings';
// Output: "hello_world"
const result = convertToSlug("Hello, World!");

clearTextToSearch(query: string): string

Escapes special characters in a string to make it safe for use in search operations.

import { clearTextToSearch } from 'mcm-util-strings';
// Output: "search\[term\]"
const result = clearTextToSearch("search[term]");

toAwait(ms: number)

Delays execution for the specified number of milliseconds.

import { toAwait } from 'mcm-util';
await toAwait(1000)

HEADERS_FORM_MULTIPART

Provides HTTP headers for multipart form data.

import { HEADERS_FORM_MULTIPART } from 'mcm-util';
this.http.post('https://your-api.com/', formData, {headers:HEADERS_FORM_MULTIPART})

dataURIToBlob(dataURI)

Converts a data URI to a Blob object.

import { dataURIToBlob } from 'mcm-util';
dataURIToBlob("data:image/png;base64,...")

processImage(imgFile)

Processes an image file and returns a Photo object with format, webPath, and base64 properties.

import { processImage } from 'mcm-util';
const photo:Photo = await processImage(file)

getBase64ImageFromURL(url)

Fetches a base64 encoded image from the specified URL.

import { getBase64ImageFromURL } from 'mcm-util';
const data = await getBase64ImageFromURL("https://example.com/image.png")

clone(object)

Deep clones an object.

import { clone } from 'mcm-util';
const copy = clone(originalObject);

arrayToString(strArray)

Converts an array of strings to a comma-separated string.

import { arrayToString } from 'mcm-util';
arrayToString(["a", "b", "c"], "-"); // "a - b - c"

capitalize(text)

Capitalizes the first letter of a string.

import { capitalize } from 'mcm-util';
capitalize("hello"); // "Hello"

toCapitalCase(sentence)

Converts a sentence to capital case, where the first letter of each word is capitalized.

import { toCapitalCase } from 'mcm-util';
toCapitalCase("hello world"); // "Hello World"

isSameDate(date, otherDate)

Checks if two dates are the same.

import { isSameDate } from 'mcm-util';
isSameDate(new Date(2025, 0, 1), new Date(2025, 0, 1)); // true

isInvalidURL(value)

Checks if a string is an invalid URL.

import { isInvalidURL } from 'mcm-util';
isInvalidURL("invalid-url"); // true

generateSecurePassword()

Generates a secure random password.

import { generateSecurePassword } from 'mcm-util-2';
generateSecurePassword() // abdc123_as@#0abdc123_as@#

createGoogleMapsLink(lat, lng)

Generates a link to Google Maps with a marker at the given latitude and longitude

import { createGoogleMapsLink } from 'mcm-util-2';
createGoogleMapsLink(-1.211, -1.211) //https://www.google.com/maps/search/?api=1&query=-1.211, -1.211

openWhatsapp()

Opens a new browser tab with a WhatsApp chat link for the given phone number

import { openWhatsapp } from 'mcm-util-2';
openWhatsapp('+593987654321') // open https://wa.me/+593987654321

buildQuery()

Build a query string from an object of key-value pairs.

import { buildQuery } from 'mcm-util-2';
buildQuery({ foo: 'bar', baz: 'qux' }) // => 'foo=bar&baz=qux'

📚 Available Pipes

| Pipe | Description | | ------------ | ----------------------------------------- | | capitalize | Capitalizes the first letter of a string.| | cutTxt | Truncates a string to a maximum length, default is 220.| | strNumber | Transforms the given value as a string to a number.|

🌟 Contributing

We welcome contributions! To get started:

  1. Fork this repository.
  2. Create a new branch for your feature or fix.
  3. Submit a pull request.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


❤️ Acknowledgments

Special thanks to the Angular community for inspiring this project!


🤖 Team

💻 Yheison Roa

🎮 Bryan Castro