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

devionjs

v1.0.8

Published

Devion is a comprehensive utility library for web developers.

Downloads

9

Readme

DevionJS

DevionJS is a comprehensive utility library for Node.js developers. It provides a wide range of functions for string manipulation, array operations, object manipulation, date operations, AJAX requests, validation, performance optimization, utility functions, logging, multimedia conversion, and text processing.

Installation

To install DevionJS, use npm:

npm install devionjs

Usage

To use DevionJS in your project, import the required functions:

import { capitalizeString, shuffleArray, deepCloneObject } from 'devionjs';

const capitalized = capitalizeString('hello world');
const shuffledArray = shuffleArray([1, 2, 3, 4, 5]);
const clonedObject = deepCloneObject({ key: 'value' });

API

String Manipulation

  • capitalizeString(str): Capitalizes the first letter of a string.
  • truncateString(str, length, ending = '...'): Truncates a string to a specified length and adds an optional ending.
  • slugifyString(str): Converts a string to a URL-friendly slug.

Array Operations

  • shuffleArray(arr): Shuffles the elements of an array.
  • uniqueArray(arr): Returns a new array with unique elements.
  • flattenArray(arr): Flattens a nested array.

Object Manipulation

  • deepCloneObject(obj): Creates a deep clone of an object.
  • mergeObjects(target, ...sources): Merges multiple objects into a target object.

Date Operations

  • formatDate(date, format = 'YYYY-MM-DD'): Formats a date according to the specified format.
  • daysBetweenDates(date1, date2): Calculates the number of days between two dates.

AJAX

  • fetchJson(url, options = {}): Fetches JSON data from a URL using native fetch.

Validation

  • isValidEmail(email): Validates an email address.
  • isValidUrl(url): Validates a URL.

Performance

  • debounceFunction(func, wait): Creates a debounced function that delays invoking the provided function.
  • throttleFunction(func, limit): Creates a throttled function that only invokes the provided function at most once per specified time limit.

Utility

  • generateUuid(): Generates a UUID.
  • memoizeFunction(fn): Creates a memoized version of a function.

Logging

  • logMessage(message): Logs a message to the console.
  • warnMessage(message): Logs a warning message to the console.
  • debugMessage(message): Logs a debug message to the console.

Multimedia

  • convertImage(imageBuffer, format): Converts an image buffer to the specified format.
  • convertAudio(audioBuffer, format): Converts an audio buffer to the specified format.
  • convertVideo(videoBuffer, format): Converts a video buffer to the specified format.

Text

  • csvToJson(csvBuffer): Converts a CSV buffer to JSON.
  • jsonToCsv(jsonData): Converts JSON data to CSV.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License.

Contact

For any questions or inquiries, please contact the project maintainer.