Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
435175b
- Refactor `fileSize` utility to improve type safety and readability.
Aug 24, 2025
7171be3
Remove `freeSelf` utility and associated files. Simplify `clone` logi…
Aug 24, 2025
a2ecbb9
Add documentation for `bind` and `isFunction` utilities.
Aug 24, 2025
7ae22d3
bump version to 5.0.0-alpha and update references in documentation
Aug 24, 2025
6216014
bump version to 5.0.0-alpha and update references in documentation
Aug 24, 2025
495b8fd
- Refactor `number` utility to handle edge cases (`NaN`, `Infinity`, …
Dec 4, 2025
2bf26c8
Add UTC date formatting and ISO parsing utilities; refine existing da…
Dec 4, 2025
9a64d91
Add `isBlank` and `isBlanks` utilities; enhance `isNumeric` and `isEv…
Dec 4, 2025
5dead29
Refactor `merge` utility for immutability, add forbidden key handling…
Dec 4, 2025
ec43efc
Add comprehensive tests for `defaults` utility; refactor for immutabi…
Dec 4, 2025
44c1b6e
Refactor `clone` utility for improved clarity and modern JavaScript p…
Dec 4, 2025
0df7d66
Enhance object utilities with forbidden key handling to prevent proto…
Dec 4, 2025
fa76928
Refactor object utilities for modern JavaScript practices; replace `O…
Dec 4, 2025
dba6289
Refactor for ESM-first exports across utilities, optimize `isObject` …
Dec 4, 2025
0e0db8d
Refactor `number` and `pick` utilities for improved type support, DX …
Dec 4, 2025
c4b2ba6
Add comprehensive tests for `number`, `isBlank`, `isNumeric`, `date`,…
Dec 4, 2025
56cd302
Document updates: expand `toQueryString`, `clone`, and `merge` utilit…
Dec 4, 2025
9eea829
Add `dateToString` utility documentation with usage details and examp…
Dec 4, 2025
9e09ebf
Expand utility documentation with updated descriptions, usage notes, …
Dec 4, 2025
2f89759
add docs
Dec 4, 2025
62bf994
add docs
Dec 5, 2025
f9273d6
add docs
Dec 5, 2025
8502a9b
add docs
Dec 5, 2025
0ad2d8e
add docs
Dec 5, 2025
c26a775
add docs
Dec 5, 2025
ecd9505
add docs
Dec 5, 2025
1d0a3ac
fix
Dec 5, 2025
a4eb121
fix
Dec 5, 2025
36a0908
fix
Dec 5, 2025
9b4407b
docs: update changelog
Dec 5, 2025
47df5e7
fix
Dec 5, 2025
0e298b9
fix
Dec 5, 2025
906beda
fix
Dec 5, 2025
6bd8b07
fix
Dec 5, 2025
6c0b3c4
fix
Dec 5, 2025
933fb5a
fix
Dec 5, 2025
4d9eeae
fix
Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 12 additions & 36 deletions .github/workflows/nodejs.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Lint changelog file
uses: avto-dev/markdown-lint@v1
with:
Expand All @@ -21,28 +21,16 @@ jobs:
name: testing on Node
strategy:
matrix:
node-version: [ 20.x ]
node-version: [ 22.x ]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}

- name: Get npm cache directory
id: npm-cache
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-

- run: yarn install
- run: yarn lint
env:
Expand All @@ -54,30 +42,18 @@ jobs:
needs: [ lint-changelog, lint-code ]
strategy:
matrix:
node-version: [ 20.x,22.x,24.x ]
node-version: [ 22.x,24.x ]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}

- name: Get npm cache directory
id: npm-cache
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-

- run: yarn install
- run: yarn test
- run: yarn test-all
env:
CI: true

Expand All @@ -86,13 +62,13 @@ jobs:
needs: [ lint-changelog, testing-on-node ]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: '20.x'
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: yarn install
# Publish to npm
- run: npm publish --access public
env:
Expand Down
21 changes: 21 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Folders not needed in the published package
node_modules
coverage
docs
tests
scripts
.github
.husky

# Local/output artifacts
*.log
.output.txt
.DS_Store

# TypeScript project files (config is whitelisted via package.json "files")
tsconfig.esm.json
tsconfig.types.json

# Editor/IDE
.idea
.vscode
11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

56 changes: 0 additions & 56 deletions .scripts/rename.ts

This file was deleted.

32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning][semver].

## [unreleased]

## [5.0.0] - 2025-12-05

### Added

- [format] New options-object API for `number`, adds `NumberFormatOptions` and `numberRus` preset
- [date] New helpers: `dateToStringUTC`, `parseISO` (strict ISO/RFC3339 parser)
- [is] New predicates: `isBlank`, `isUrl` docs extended; added/clarified predicates for floats, integers, numerics
- [object] New/extended docs and tests for `defaults`, `merge`, `fromQueryString`, `pathToObject`, `values`, `sum`, `logicalAnd`, `getSize`, `toQueryObjects`, `toQueryString`
- [core] New clone strategy based on `structuredClone` with fallback for plain objects/arrays
- [tests] Integration test for imports/typings (`tests/integration/importMu.ts`); extended tests for format/date/is/object
- [docs] Full per-helper documentation in `docs/**` for all functions listed in `docs/README.md` (EN) and
`docs/ru/README.md` (RU overview)

### Changed

- [core] Drop CJS usage in src; ESM-first package layout, Node >= 22 as minimum runtime
- [object] `merge` and `defaults` made **immutable**, use only own enumerable keys, deep-merge only plain objects; arrays now cloned instead of merged; added proto-pollution guards
- [core] `clone` behavior modernized for Node 22 (uses `structuredClone` where safe; clearer handling of Dates, complex types)
- [date] `elapsed` and `now` simplified; `dateToString` explicitly local, `dateToStringUTC` explicitly UTC
- [format] `number`/`numberRus` now корректно обрабатывают `NaN`, `Infinity`, `-0`; RU‑локаль: запятая как десятичный разделитель, пробел — тысячный
- [is] Ужесточена логика `isNumeric`, `isEven`, других числовых предикатов (используются `Number.isFinite`, явное приведение)
- [object] Использование современных нативных API (`Object.hasOwn`, `Object.values`, `URLSearchParams`) вместо самописных утилит
- [core/object/date/format/is] Масштабное обновление JSDoc и пользовательской документации для отражения новой семантики
- [tests] Jest/ts-jest сконфигурирован на `isolatedModules: true` через `tsconfig.json`

### Fixed

- [format] Исправлена русская локаль в `numberRus` (запятая как десятичный разделитель, пробел как разделитель тысяч)
- [object] Исправлены возможные пути proto-pollution в `fromQueryString`, `pathToObject` и связанных хелперах
- [is] Устранены неточные проверки чисел (отказ от глобального `isNaN`/`isFinite` в пользу `Number.isNaN`/`Number.isFinite`)
- [docs] Устранены расхождения между документацией и кодом, добавлены отсутствующие страницы, обновлены README EN/RU

## [4.7.0] - 2023-11-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Fureev Eugene
Copyright (c) 2025 Fureev Eugene

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 15 additions & 5 deletions dist/cjs/array/intersect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/array/intersect.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion dist/cjs/array/random.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/array/random.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions dist/cjs/core/clone.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/core/clone.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion dist/cjs/core/match.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/core/match.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading