Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changelog

All notable changes to this project will be documented in this file.

## [1.2.0] - 2026-03-29

### Added
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- `slugify(text)` — Convert string to URL-safe slug
- `truncate(str, length)` — Truncate string with ellipsis
- `sleep(ms)` — Async sleep helper
- `chunk(array, size)` — Split array into chunks
- `formatNumber(num)` — Format numbers with K/M/B suffixes
- `debounce(fn, delay)` — Debounce function calls
- `capitalize(str)` — Capitalize first letter
- `isEmpty(value)` — Check if value is empty
- `deepClone(obj)` — Deep clone objects
- Vitest test suite for all functions

### Fixed

- `shuffleArray()` no longer mutates the original array
- Renamed `uniqueArrayitems` to `uniqueArrayItems` (consistent casing)
- Added security warning to `randomString()` (not for tokens/passwords)

## [1.1.2] - Previous

### Features

- `randomString`, `randomNumber`, `binary`
- `shuffleArray`, `randomArrayItem`, `randomItemsArray`, `uniqueArrayitems`
- DOM utilities: `querySelector`, `querySelectorAll`, `toggleClass`, `createNewElement`, `appendToParentElement`
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": ["esnext", "dom", "dom.iterable"]
},
"version": "1.1.2",
"version": "1.2.0",
"exports": "./src/index.ts",
"publish": {
"include": ["src", "README.md", "LICENSE"]
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amitind/util",
"version": "1.1.2",
"version": "1.2.0",
"description": "Some useful Javascript functions that I use.",
"type": "module",
"files": [
Expand All @@ -20,7 +20,8 @@
"dev": "vite",
"dev:build": "rimraf dist && pnpm build --watch",
"build": "tsc && vite build",
"test": "echo \"No tests\"",
"test": "vitest run",
"test:watch": "vitest",
"prepublishOnly": "npm run build"
},
"repository": {
Expand All @@ -44,6 +45,7 @@
"rimraf": "^6.0.1",
"typescript": "^5.6.3",
"vite": "^5.4.8",
"vite-plugin-dts": "^4.2.4"
"vite-plugin-dts": "^4.2.4",
"vitest": "^1.6.1"
}
}
Loading
Loading