thaw 2.1.4 → 3.0.0

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +0 -14
  3. package/package.json +10 -11
package/README.md CHANGED
@@ -4,7 +4,7 @@ This package provides **narrow-trench** methods for aspect-oriented programming
4
4
 
5
5
  ## Prerequisites
6
6
 
7
- * Node.js `>= 14.x`
7
+ * Node.js `>= 16.x`
8
8
 
9
9
  ## Installation
10
10
 
package/dist/index.js CHANGED
@@ -2,45 +2,34 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.throttle = exports.debounce = exports.compose = exports.before = exports.around = exports.after = void 0;
5
-
6
5
  const around = (fn, cb) => {
7
6
  return (...args) => {
8
7
  return cb(fn(cb(...args)));
9
8
  };
10
9
  };
11
-
12
10
  exports.around = around;
13
-
14
11
  const after = (fn, cb) => {
15
12
  return (...args) => {
16
13
  return cb(fn(...args));
17
14
  };
18
15
  };
19
-
20
16
  exports.after = after;
21
-
22
17
  const before = (fn, cb) => {
23
18
  return (...args) => {
24
19
  return fn(cb(...args));
25
20
  };
26
21
  };
27
-
28
22
  exports.before = before;
29
-
30
23
  const compose = (...fns) => {
31
24
  return (...args) => {
32
25
  let result = null;
33
-
34
26
  for (let i = 0; i < fns.length; i++) {
35
27
  result = fns[i](...(i ? [result] : args));
36
28
  }
37
-
38
29
  return result;
39
30
  };
40
31
  };
41
-
42
32
  exports.compose = compose;
43
-
44
33
  const debounce = (fn, wait = 0) => {
45
34
  let tick;
46
35
  return (...args) => {
@@ -50,9 +39,7 @@ const debounce = (fn, wait = 0) => {
50
39
  }, wait);
51
40
  };
52
41
  };
53
-
54
42
  exports.debounce = debounce;
55
-
56
43
  const throttle = (fn, wait = 0) => {
57
44
  let tick;
58
45
  return (...args) => {
@@ -62,5 +49,4 @@ const throttle = (fn, wait = 0) => {
62
49
  }, wait);
63
50
  };
64
51
  };
65
-
66
52
  exports.throttle = throttle;
package/package.json CHANGED
@@ -8,18 +8,18 @@
8
8
  "url": "https://github.com/bricss/thaw/issues"
9
9
  },
10
10
  "devDependencies": {
11
- "@babel/cli": "^7.18.10",
12
- "@babel/core": "^7.19.1",
13
- "@babel/eslint-parser": "^7.19.1",
14
- "@babel/preset-env": "^7.19.1",
15
- "c8": "^7.12.0",
16
- "eslint": "^8.24.0",
17
- "eslint-config-ultra-refined": "^2.6.0",
18
- "mocha": "^10.0.0"
11
+ "@babel/cli": "^7.21.5",
12
+ "@babel/core": "^7.21.8",
13
+ "@babel/eslint-parser": "^7.21.8",
14
+ "@babel/preset-env": "^7.21.5",
15
+ "c8": "^7.13.0",
16
+ "eslint": "^8.40.0",
17
+ "eslint-config-ultra-refined": "^2.13.0",
18
+ "mocha": "^10.2.0"
19
19
  },
20
20
  "description": "The narrow belt for AOP 🎀",
21
21
  "engines": {
22
- "node": ">=14.x"
22
+ "node": ">=16.x"
23
23
  },
24
24
  "exports": {
25
25
  "import": "./src/index.mjs",
@@ -36,7 +36,6 @@
36
36
  "aspect-oriented"
37
37
  ],
38
38
  "license": "MIT",
39
- "main": "./dist/index.js",
40
39
  "name": "thaw",
41
40
  "repository": {
42
41
  "type": "git",
@@ -50,5 +49,5 @@
50
49
  "test": "mocha --exit --recursive",
51
50
  "test:cover": "c8 --include=src --reporter=lcov --reporter=text npm test"
52
51
  },
53
- "version": "2.1.4"
52
+ "version": "3.0.0"
54
53
  }