qsu 1.12.0 → 1.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export declare function arrPick(array: any[]): any;
@@ -0,0 +1 @@
1
+ export function arrPick(r){return!r||!Array.isArray(r)||r.length<1?null:r[Math.random()*r.length|0]}
@@ -1,6 +1,7 @@
1
1
  export { arrCount } from './arrCount.js';
2
2
  export { arrGroupByMaxCount } from './arrGroupByMaxCount.js';
3
3
  export { arrMove } from './arrMove.js';
4
+ export { arrPick } from './arrPick.js';
4
5
  export { arrRepeat } from './arrRepeat.js';
5
6
  export { arrShuffle } from './arrShuffle.js';
6
7
  export { arrTo1dArray } from './arrTo1dArray.js';
@@ -1 +1 @@
1
- export{arrCount}from"./arrCount.js";export{arrGroupByMaxCount}from"./arrGroupByMaxCount.js";export{arrMove}from"./arrMove.js";export{arrRepeat}from"./arrRepeat.js";export{arrShuffle}from"./arrShuffle.js";export{arrTo1dArray}from"./arrTo1dArray.js";export{arrUnique}from"./arrUnique.js";export{arrWithDefault}from"./arrWithDefault.js";export{arrWithNumber}from"./arrWithNumber.js";export{average}from"./average.js";export{sortByObjectKey}from"./sortByObjectKey.js";export{sortNumeric}from"./sortNumeric.js";
1
+ export{arrCount}from"./arrCount.js";export{arrGroupByMaxCount}from"./arrGroupByMaxCount.js";export{arrMove}from"./arrMove.js";export{arrPick}from"./arrPick.js";export{arrRepeat}from"./arrRepeat.js";export{arrShuffle}from"./arrShuffle.js";export{arrTo1dArray}from"./arrTo1dArray.js";export{arrUnique}from"./arrUnique.js";export{arrWithDefault}from"./arrWithDefault.js";export{arrWithNumber}from"./arrWithNumber.js";export{average}from"./average.js";export{sortByObjectKey}from"./sortByObjectKey.js";export{sortNumeric}from"./sortNumeric.js";
@@ -1 +1 @@
1
- import{contains as t}from"../verify/contains.js";import{capitalizeFirst as r}from"./capitalizeFirst.js";export function capitalizeEachWords(o,i){if(!o)return"";const a=o.trim().toLowerCase().split(" ");for(let o=0,e=a.length;o<e;o+=1)i&&t(a[o],["in","on","the","at","and","or","of","for","to","that","a","by","it","is","as","are","were","was","nor","an"],!0)||(a[o]=r(a[o]));return r(a.join(" "))}
1
+ import{contains as t}from"../verify/contains.js";import{capitalizeFirst as r}from"./capitalizeFirst.js";export function capitalizeEachWords(o,i){if(!o)return"";let a=o.trim();i&&(a=a.toLowerCase());const e=a.split(" ");for(let o=0,a=e.length;o<a;o+=1)i&&t(e[o],["in","on","the","at","and","or","of","for","to","that","a","by","it","is","as","are","were","was","nor","an"],!0)||(e[o]=r(e[o]));return r(e.join(" "))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qsu",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.",
5
5
  "author": "CDGet <jooy2.contact@gmail.com>",
6
6
  "license": "MIT",
@@ -73,18 +73,18 @@
73
73
  ],
74
74
  "devDependencies": {
75
75
  "@eslint/js": "^9.39.2",
76
- "@types/node": "^25.6.0",
77
- "@typescript-eslint/parser": "^8.58.1",
78
- "dayjs": "^1.11.20",
76
+ "@types/node": "^25.9.2",
77
+ "@typescript-eslint/parser": "^8.60.1",
78
+ "dayjs": "^1.11.21",
79
79
  "eslint": "^9.39.2",
80
80
  "eslint-config-prettier": "^10.1.8",
81
- "eslint-plugin-n": "^17.24.0",
82
- "globals": "^17.4.0",
83
- "jiti": "^2.6.1",
84
- "prettier": "^3.8.2",
81
+ "eslint-plugin-n": "^18.0.1",
82
+ "globals": "^17.6.0",
83
+ "jiti": "^2.7.0",
84
+ "prettier": "^3.8.3",
85
85
  "terser-glob": "^1.2.1",
86
- "tsx": "^4.21.0",
87
- "typescript": "6.0.2",
88
- "typescript-eslint": "^8.58.1"
86
+ "tsx": "^4.22.4",
87
+ "typescript": "6.0.3",
88
+ "typescript-eslint": "^8.60.1"
89
89
  }
90
90
  }