Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: apsonex/js-utils

1.0.9

13 Jul 21:41

Choose a tag to compare

🛠 Fix: Event Listener Cleanup Support

Event listeners registered via events.<name>.listen() now return a cleanup function, allowing proper removal of listeners (e.g. in onBeforeUnmount in Vue). This prevents memory leaks and ensures multiple listeners can coexist safely.

Usage:

const unlisten = events.insertPlaceholder.listen((payload) => {
  // handle event
});

onBeforeUnmount(() => {
  unlisten(); // clean up
});

1.0.8

13 Jul 19:40

Choose a tag to compare

Renamed sentenseCase method to titleCase in str class.

1.0.7

13 Jul 19:34

Choose a tag to compare

🔖 Release: 1.0.7 – Enhanced String Utilities & Improvements

✨ What's New

🔡 String Enhancements (str)

  • sentenseCase()
    Converts strings like "HELLO_WORLD" or "hello_world" into "Hello World". Ideal for formatting constants, slugs, or identifiers into readable labels.

  • capitalizeWords()
    Capitalizes the first letter of every word:
    'make javascript readable''Make Javascript Readable'

  • 🧼 Internally added resolveValue() to normalize input across all string methods.

📚 Updated Documentation

  • README.md updated with:
    • New examples for sentenseCase() and capitalizeWords()
    • Complete list of all chainable str methods

🐛 Fixes & Improvements

  • Refactored string methods to consistently handle edge cases and non-string inputs
  • Improved reliability and output formatting in various utilities

📦 Module Highlights

  • 🔡 str() – Laravel-like chainable string manipulation
  • 💾 JsCache – localStorage cache with TTL support
  • 📜 loadScript / loadStyle – asset loading with deduplication
  • 🧩 DOM helpers – bodyScrollDisable, isIframe, etc.
  • 📡 Events – iframe ↔ parent messaging made simple
  • 🔁 Pipeline – sync/async task flow utility

🚀 Install or Upgrade

npm install @apsonex/js-utils@latest
# or
yarn add @apsonex/js-utils@latest

🔗 MIT Licensed by Apsonex Inc.

1.0.6

12 Jul 04:54

Choose a tag to compare

Updated version

1.0.5

12 Jul 04:45

Choose a tag to compare

WIP

1.0.4

05 Jun 17:44

Choose a tag to compare

Tests Added

1.0.3

05 Jun 16:44

Choose a tag to compare

Added the Pipeline

1.0.2

05 Jun 16:37

Choose a tag to compare

Added Events

1.0.1

05 Jun 01:22

Choose a tag to compare

Initial Release