@emohk/utils 1.0.0 → 1.0.1

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.
package/README.md CHANGED
@@ -10,6 +10,27 @@ npm install @emohk/utils
10
10
 
11
11
  ## Usage
12
12
 
13
+ ESM
14
+
15
+ ```ts
16
+ import { checkStringPresent, checkObject, hasValues, chunk } from '@emohk/utils'
17
+ ```
18
+
19
+ CommonJS
20
+
21
+ ```ts
22
+ const { checkStringPresent, checkObject, hasValues, chunk } = require('@emohk/utils')
23
+ ```
24
+
25
+ Example
26
+
27
+ ```ts
28
+ checkStringPresent('hello world') // true
29
+ checkObject({}) // true
30
+ hasValues([1, 2, 3]) // true
31
+ chunk([1, 2, 3, 4, 5, 6], 2) // [[1, 2], [3, 4], [5, 6]]
32
+ ```
33
+
13
34
  Go to the [API documentation](https://github.com/emocreation/js-utils/blob/main/docs/API.md) for more information.
14
35
 
15
36
  ## Development
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- var{defineProperty:E,getOwnPropertyNames:G,getOwnPropertyDescriptor:H}=Object,I=Object.prototype.hasOwnProperty;var F=new WeakMap,J=(q)=>{var B=F.get(q),D;if(B)return B;if(B=E({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function")G(q).map((C)=>!I.call(B,C)&&E(B,C,{get:()=>q[C],enumerable:!(D=H(q,C))||D.enumerable}));return F.set(q,B),B};var K=(q,B)=>{for(var D in B)E(q,D,{get:B[D],enumerable:!0,configurable:!0,set:(C)=>B[D]=()=>C})};var P={};K(P,{hasValues:()=>N,chunk:()=>O,checkStringPresent:()=>L,checkObject:()=>M});module.exports=J(P);var L=(q)=>typeof q==="string"&&q.trim().length>0,M=(q)=>typeof q==="object"&&q!==null&&!Array.isArray(q)&&q.constructor===Object,N=(q)=>Array.isArray(q)&&q.length>0,O=(q,B)=>Array.from({length:Math.ceil(q.length/B)},(D,C)=>q.slice(C*B,C*B+B));
1
+ var{defineProperty:E,getOwnPropertyNames:G,getOwnPropertyDescriptor:H}=Object,I=Object.prototype.hasOwnProperty;function J(q){return this[q]}var K=(q)=>{var B=(F??=new WeakMap).get(q),C;if(B)return B;if(B=E({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var D of G(q))if(!I.call(B,D))E(B,D,{get:J.bind(q,D),enumerable:!(C=H(q,D))||C.enumerable})}return F.set(q,B),B},F;var L=(q)=>q;function M(q,B){this[q]=L.bind(null,B)}var N=(q,B)=>{for(var C in B)E(q,C,{get:B[C],enumerable:!0,configurable:!0,set:M.bind(B,C)})};var U={};N(U,{hasValues:()=>Q,chunk:()=>R,checkStringPresent:()=>O,checkObject:()=>P});module.exports=K(U);var O=(q)=>typeof q==="string"&&q.trim().length>0,P=(q)=>typeof q==="object"&&q!==null&&!Array.isArray(q)&&q.constructor===Object,Q=(q)=>Array.isArray(q)&&q.length>0,R=(q,B)=>Array.from({length:Math.ceil(q.length/B)},(C,D)=>q.slice(D*B,D*B+B));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emohk/utils",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A collection of utility functions for various projects.",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",
@@ -20,12 +20,13 @@
20
20
  ],
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://github.com/emocreation/js-utils.git"
23
+ "url": "git+https://github.com/emocreation/js-utils.git"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/bun": "latest",
27
- "typedoc": "^0.28.16",
28
- "typedoc-plugin-markdown": "^4.9.0"
27
+ "prettier": "^3.8.1",
28
+ "typedoc": "^0.28.17",
29
+ "typedoc-plugin-markdown": "^4.10.0"
29
30
  },
30
31
  "peerDependencies": {
31
32
  "typescript": "^5.9.3"