JSPM

  • Created
  • Published
  • Downloads 210
  • Score
    100M100P100Q81852F
  • License ISC

Comprehensive JavaScript and TypeScript utilities for seamless development. Includes object manipulation, data validation, and more.

Package Exports

  • @devlander/utils
  • @devlander/utils/dist/cjs/index.js
  • @devlander/utils/dist/esm/index.js
  • @devlander/utils/dist/umd/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@devlander/utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Devlander JavaScript Utilities Collection


Devlander Utils Header
Join Devlander on Discord
npm downloads
Join the discussion on Github
Join Devlander on Twitch
Follow Landon Johnson On Twitter
Wakatime stats for utils

Netlify Status



See testing results

Enhance your JavaScript projects with the Devlander JavaScript Utils Collection—a meticulously curated set of utility functions to streamline your coding workflow. Join our vibrant community on Discord, engage in discussions on GitHub, and stay updated with our latest streams on Twitch. Boost your project's efficiency today!


📚 New to contributing? Start here!

If you're new to open source, npm packages, or TypeScript, please reference the step-by-step Medium articles linked below. These guides will walk you through everything from Git basics to advanced package publishing, testing, and code style:

These articles are highly recommended for all contributors!


About This Project

The Devlander JavaScript Utils Collection is an evolving library of JavaScript utilities developed by Landon Johnson. These utilities address everyday coding tasks, reducing the need for repetitive code and enhancing productivity. Open to community input for naming and improvements, this project aims to be a go-to resource for developers.

Utilities Overview

JSON Utilities

  • isDeepEqual(obj1, obj2): Deeply compares two objects for equality.
  • isJson(value): Validates if a value is a legitimate JSON string or object.
  • mergeObjects(oldObj, newObj): Merges two nested objects into one.

Filter Utilities

  • hasItemByLetterAndFilter(array, key, value): Filters various objects based on a specified letter and additional filter criteria.

Conversion Utilities

  • abbreviateNumber(value): Abbreviates numbers with appropriate suffixes (k, m, b, t) for readability.

Timeout Utilities

  • waitFor(value, timeUnits?: ms | s, logDuration?: boolean): Delays the execution of a function by a specified time.

Quick Start and Documentation

Dive into our utility functions with ease. Each utility is documented with parameters, return values, and usage examples to get you started quickly. Whether you're merging objects, checking JSON validity, or filtering data, our collection is designed to enhance your development process with minimal effort.

  • Installation: npm install @devlander/utils
  • Usage: Import utilities as needed in your project. Example usage is provided for each function to illustrate its application.

Changelog

For a full list of changes, check the CHANGELOG.md file.

Engage and Contribute

We welcome contributions, feedback, and suggestions! Join our discussions on GitHub, or connect with us on Discord and Twitter. Your input helps us improve the Devlander JavaScript Utils Collection for the developer community.

Before contributing, please read the Medium articles above for step-by-step guidance on Git, npm, TypeScript, testing, and code style.

Become a Sponsor!

🧪 Cross-Platform Testing

This package includes comprehensive cross-platform testing to ensure compatibility across different environments:

Automated Testing

  • Unit Tests: Run with yarn test
  • Cross-Platform Tests: Run with yarn test:examples
  • Full Pre-Publish Check: Run with yarn prepublishOnly

Example Apps

The /examples directory contains minimal test apps for each platform:

  • React (examples/react/) - Vite-based React app
  • Next.js (examples/nextjs/) - Next.js app with TypeScript
  • React Native (examples/react-native/) - Expo app
  • Node.js (examples/node/) - Node.js with TypeScript

How It Works

  1. Build & Pack: Creates a tarball (exactly like npm would deliver)
  2. Install: Installs the tarball into each example app
  3. Test: Runs tests in each environment to verify imports work
  4. Validate: Ensures your package works in real-world scenarios

This guarantees that your package can be installed and used successfully in React, Next.js, React Native, and Node.js projects.