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!
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!
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.
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.hasItemByLetterAndFilter(array, key, value)
: Filters various objects based on a specified letter and additional filter criteria.abbreviateNumber(value)
: Abbreviates numbers with appropriate suffixes (k, m, b, t) for readability.waitFor(value, timeUnits?: ms | s, logDuration?: boolean)
: Delays the execution of a function by a specified time.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.
npm install @devlander/utils
For a full list of changes, check the CHANGELOG.md file.
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.
This package includes comprehensive cross-platform testing to ensure compatibility across different environments:
yarn test
yarn test:examples
yarn prepublishOnly
The /examples
directory contains minimal test apps for each platform:
examples/react/
) - Vite-based React appexamples/nextjs/
) - Next.js app with TypeScriptexamples/react-native/
) - Expo appexamples/node/
) - Node.js with TypeScriptThis guarantees that your package can be installed and used successfully in React, Next.js, React Native, and Node.js projects.
This project uses an automated release process with GitHub Actions. Here's how it works:
Create a new version: Use one of the release commands:
# Standard release (with version checking)
yarn release:patch:check # 1.0.1 β 1.0.2
yarn release:minor:check # 1.0.1 β 1.1.0
yarn release:major:check # 1.0.1 β 2.0.0
# Quick release (no version checking)
yarn release:patch # 1.0.1 β 1.0.2
yarn release:minor # 1.0.1 β 1.1.0
yarn release:major # 1.0.1 β 2.0.0
What happens automatically:
package.json
If you prefer manual control:
# Generate changelog and create release
yarn release
This project uses Conventional Commits for automatic changelog generation:
feat:
- New featuresfix:
- Bug fixes docs:
- Documentation changesstyle:
- Code style changesrefactor:
- Code refactoringtest:
- Test changeschore:
- Maintenance tasksThe release process uses dual-layer version checking:
Local Check (before pushing tag):
npm view @devlander/utils@1.0.2 version
GitHub Action Check (after tag push):
v1.0.2
β 1.0.2
)1.0.0
(published 3 days ago)1.0.1
(ready for next release)