tssentials 1.0.4 → 1.0.6

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/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { processIfPresent, ifPresent } from './util';
1
+ export { processIfPresent, ifPresent, apply } from './util.js';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { processIfPresent, ifPresent } from './util';
1
+ export { processIfPresent, ifPresent, apply } from './util.js';
package/dist/util.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare const processIfPresent: <T, R>(v: T | null | undefined, callback: (v: T) => R) => R | undefined;
2
2
  export declare const ifPresent: <T, R>(v: T | null | undefined, callback: (v: T) => R) => R | undefined;
3
+ export declare const apply: <T, R>(v: T, callback: (v: T) => R) => R;
package/dist/util.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export const processIfPresent = (v, callback) => (v != null && v != undefined) ? callback(v) : undefined;
2
2
  export const ifPresent = processIfPresent;
3
+ export const apply = (v, callback) => callback(v);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tssentials",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Essential functions and types for typescript projects.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,11 +21,15 @@
21
21
  },
22
22
  "scripts": {
23
23
  "test": "echo \"Error: no test specified\" && exit 1",
24
- "build": "tsc"
24
+ "build": "tsc",
25
+ "lint": "eslint ."
25
26
  },
26
27
  "author": "Timo Bühlmann",
27
28
  "license": "MIT",
28
29
  "devDependencies": {
29
- "typescript": "^5.7.3"
30
+ "@eslint/js": "^9.23.0",
31
+ "eslint": "^9.23.0",
32
+ "typescript": "^5.8.2",
33
+ "typescript-eslint": "^8.28.0"
30
34
  }
31
35
  }