Skip to content

Commit

Permalink
release v5.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed Oct 23, 2023
1 parent bfce7e1 commit 4038173
Show file tree
Hide file tree
Showing 9 changed files with 867 additions and 783 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change logs

## 2023.10.09 v5.12.0

1. new `isEqual` function, see: [isEqual](https://github.com/saqqdy/js-cool#isequal)
2. upgrade all packages

## 2023.10.09 v5.11.0

1. new `getFileType` function, see: [getFileType](https://github.com/saqqdy/js-cool#getfiletype)
Expand Down
1 change: 1 addition & 0 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const functionList = {
isDigitals, // 是否为由数字组成的字符串
isExitsFunction, // 是否存在指定函数
isExitsVariable, // 是否存在指定变量
isEqual, // 比较2个对象是否相等
isWindow, // 是否window对象
isPlainObject, // 是否plainObject
isDarkMode, // 是否暗色模式
Expand Down
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Collection of common JavaScript / TypeScript utilities
- [isDigitals](#isdigitals)
- [isExitsFunction](#isexitsfunction)
- [isExitsVariable](#isexitsvariable)
- [isEqual](#isequal)
- [isWindow](#iswindow)
- [isPlainObject](#isplainobject)
- [isDarkMode](#isdarkmode)
Expand Down Expand Up @@ -846,6 +847,40 @@ isExitsVariable('window') // true
declare function isExitsVariable(name: string): boolean
```

#### isEqual

Determine if 2 objects are equal

- Since: `5.12.0`

- Arguments:

| Parameters | Description | Type | Optional | Required | Default |
| ---------- | ----------- | ----- | -------- | -------- | ------- |
| a | source | `any` | - | `true` | - |
| b | compare | `any` | - | `true` | - |

- Returns: `boolean`

- Example:

```ts
isEqual({ a: 22, b: {} }, { b: {}, a: 22 })
// true
isEqual([1, 2], [2, 1])
// false
isEqual(NaN, NaN)
// true
```

- Types:

```ts
declare function isEqual<T, P>(a: T, b: P): boolean
```

#### isWindow

Determine if window object
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-cool",
"description": "Collection of common JavaScript / TypeScript utilities",
"version": "5.11.0",
"version": "5.12.0",
"packageManager": "[email protected]",
"main": "dist/index.cjs.js",
"module": "dist/index.esm-bundler.js",
Expand Down Expand Up @@ -57,35 +57,35 @@
"use-downloads": "^1.5.0"
},
"devDependencies": {
"@babel/core": "^7.23.0",
"@babel/plugin-transform-runtime": "^7.22.15",
"@babel/preset-env": "^7.22.20",
"@babel/preset-typescript": "^7.23.0",
"@eslint-sets/eslint-config-ts": "^5.9.0",
"@babel/core": "^7.23.2",
"@babel/plugin-transform-runtime": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@eslint-sets/eslint-config-ts": "^5.10.0",
"@microsoft/api-extractor": "^7.38.0",
"@rollup/plugin-alias": "^5.0.1",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.5",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.3",
"@rollup/plugin-replace": "^5.0.4",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@types/activex-excel": "^14.0.7",
"@types/babel__core": "^7.20.2",
"@types/node": "^20.8.3",
"@types/activex-excel": "^14.0.8",
"@types/babel__core": "^7.20.3",
"@types/node": "^20.8.7",
"babel-loader": "^9.1.3",
"core-js": "^3.33.0",
"core-js": "^3.33.1",
"cross-env": "^7.0.3",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"fast-glob": "^3.3.1",
"load-yml": "^1.4.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.3",
"prettier-config-common": "^1.4.0",
"reinstaller": "^3.0.2",
"rm-all": "^1.1.1",
"rollup": "^4.0.2",
"rollup": "^4.1.4",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-polyfill-node": "^0.12.0",
Expand Down
Loading

0 comments on commit 4038173

Please sign in to comment.