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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dzamiy-npm

v1.0.2

Published

This is a simple utility package that provides functions for text formatting and array sorting. It demonstrates how to create and publish an npm package, and leverages the powerful Lodash library for text formatting and sorting tasks.

Readme

dzamiy-npm

This is a simple utility package that provides functions for text formatting and array sorting. It demonstrates how to create and publish an npm package, and leverages the powerful Lodash library for text formatting and sorting tasks.

这是一个简单的工具包,提供了用于文本格式化和数组排序的功能。它利用了强大的 Lodash 库来完成这些任务。该包易于使用,并展示了如何创建和发布一个 npm 包。

Features / 功能

  • capitalizeWords(text): Takes a string as input and capitalizes the first letter of each word. This can be useful for formatting titles or headers.

  • capitalizeWords(text):接受一个字符串作为输入,并将每个单词的首字母大写。这对于格式化标题或头部非常有用。

  • sortArray(arr): Takes an array and sorts its elements in ascending order. This can be used to sort numbers or strings.

  • sortArray(arr):接受一个数组并将其元素按升序排列。可以用来对数字或字符串进行排序。

Installation / 安装

To install this package, run the following command in your terminal:

要安装此包,请在终端中运行以下命令:

npm install dzamiy-npm

Usage / 使用方法 Once installed, you can use the package in your JavaScript code. Here’s how:

安装后,您可以在 JavaScript 代码中使用此包。使用方法如下: Import the package / 导入包

    import MyUtility from 'dzamiy-npm';

Example 1: Capitalize Words / 示例 1:首字母大写 The capitalizeWords function capitalizes the first letter of each word in a sentence. This is particularly useful for formatting titles or strings where each word needs to start with an uppercase letter.

capitalizeWords 函数将句子中每个单词的首字母转换为大写。这在格式化标题或需要将每个单词的首字母大写的字符串时特别有用。
        const formattedText = MyUtility.capitalizeWords('hello world');
        console.log(formattedText);  // Output: "Hello World"

Example 2: Sort an Array / 示例 2:排序数组 The sortArray function sorts an array of numbers or strings in ascending order.

sortArray 函数将一个数字或字符串数组按升序排序。
        const sortedArray = MyUtility.sortArray([5, 3, 8, 1]);
        console.log(sortedArray);  // Output: [1, 3, 5, 8]