@solid-primitives/utils 3.0.1 → 3.0.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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Solid Primitives Working Group
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Solid Primitives Working Group
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
- <p>
2
- <img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=Utils" alt="Solid Primitives Utils">
3
- </p>
4
-
5
- # @solid-primitives/utils
6
-
7
- Solid Primitives Utilities is a support and helper package for a number of primitives in our library. Please free to augment or centralize useful utilities and methods in this package for sharing.
8
-
9
- ## Installation
10
-
11
- ```bash
12
- npm install @solid-primitives/utils
13
- # or
14
- yarn add @solid-primitives/utils
15
- ```
16
-
17
- ## Changelog
18
-
19
- See [CHANGELOG.md](./CHANGELOG.md)
1
+ <p>
2
+ <img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=Utils" alt="Solid Primitives Utils">
3
+ </p>
4
+
5
+ # @solid-primitives/utils
6
+
7
+ Solid Primitives Utilities is a support and helper package for a number of primitives in our library. Please free to augment or centralize useful utilities and methods in this package for sharing.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @solid-primitives/utils
13
+ # or
14
+ yarn add @solid-primitives/utils
15
+ ```
16
+
17
+ ## Changelog
18
+
19
+ See [CHANGELOG.md](./CHANGELOG.md)
package/dist/index.cjs CHANGED
@@ -87,7 +87,9 @@ function accessWith(valueOrFn, ...args) {
87
87
  return typeof valueOrFn === "function" ? valueOrFn(...args) : valueOrFn;
88
88
  }
89
89
  function forEachEntry(object, iterator) {
90
- Object.entries(object).forEach(([key, item], index, pairs) => iterator(key, item, index, pairs, object));
90
+ Object.entries(object).forEach(
91
+ ([key, item], index, pairs) => iterator(key, item, index, pairs, object)
92
+ );
91
93
  }
92
94
  var entries = Object.entries;
93
95
  var keys = Object.keys;
@@ -113,14 +115,17 @@ function createMicrotask(fn) {
113
115
  };
114
116
  }
115
117
  function createProxy(traps) {
116
- return new Proxy({}, {
117
- get: (_, k) => traps.get(k),
118
- set: (_, k, v) => {
119
- var _a;
120
- (_a = traps.set) == null ? void 0 : _a.call(traps, k, v);
121
- return false;
118
+ return new Proxy(
119
+ {},
120
+ {
121
+ get: (_, k) => traps.get(k),
122
+ set: (_, k, v) => {
123
+ var _a;
124
+ (_a = traps.set) == null ? void 0 : _a.call(traps, k, v);
125
+ return false;
126
+ }
122
127
  }
123
- });
128
+ );
124
129
  }
125
130
  var createTrigger = isDev ? () => (0, import_solid_js.createSignal)(void 0, { equals: false, name: "trigger" }) : () => (0, import_solid_js.createSignal)(void 0, { equals: false });
126
131
  function dirtyTriggerCache(key) {
package/dist/index.js CHANGED
@@ -1,5 +1,3 @@
1
- "use strict";
2
-
3
1
  // src/index.ts
4
2
  import {
5
3
  getOwner,
@@ -44,7 +42,9 @@ function accessWith(valueOrFn, ...args) {
44
42
  return typeof valueOrFn === "function" ? valueOrFn(...args) : valueOrFn;
45
43
  }
46
44
  function forEachEntry(object, iterator) {
47
- Object.entries(object).forEach(([key, item], index, pairs) => iterator(key, item, index, pairs, object));
45
+ Object.entries(object).forEach(
46
+ ([key, item], index, pairs) => iterator(key, item, index, pairs, object)
47
+ );
48
48
  }
49
49
  var entries = Object.entries;
50
50
  var keys = Object.keys;
@@ -70,14 +70,17 @@ function createMicrotask(fn) {
70
70
  };
71
71
  }
72
72
  function createProxy(traps) {
73
- return new Proxy({}, {
74
- get: (_, k) => traps.get(k),
75
- set: (_, k, v) => {
76
- var _a;
77
- (_a = traps.set) == null ? void 0 : _a.call(traps, k, v);
78
- return false;
73
+ return new Proxy(
74
+ {},
75
+ {
76
+ get: (_, k) => traps.get(k),
77
+ set: (_, k, v) => {
78
+ var _a;
79
+ (_a = traps.set) == null ? void 0 : _a.call(traps, k, v);
80
+ return false;
81
+ }
79
82
  }
80
- });
83
+ );
81
84
  }
82
85
  var createTrigger = isDev ? () => createSignal(void 0, { equals: false, name: "trigger" }) : () => createSignal(void 0, { equals: false });
83
86
  function dirtyTriggerCache(key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solid-primitives/utils",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "A bunch of reactive utility types and functions, for building primitives with Solid.js",
5
5
  "author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>",
6
6
  "license": "MIT",
@@ -21,11 +21,6 @@
21
21
  "files": [
22
22
  "dist"
23
23
  ],
24
- "scripts": {
25
- "build": "tsup",
26
- "test": "uvu -r solid-register",
27
- "test:watch": "watchlist src test -- npm test"
28
- },
29
24
  "keywords": [
30
25
  "utilities",
31
26
  "reactivity",
@@ -35,13 +30,19 @@
35
30
  "devDependencies": {
36
31
  "jsdom": "^20.0.0",
37
32
  "prettier": "^2.7.1",
33
+ "solid-js": "^1.5.1",
38
34
  "solid-register": "^0.2.5",
39
35
  "tslib": "^2.4.0",
40
- "tsup": "^6.2.1",
36
+ "tsup": "^6.2.2",
41
37
  "uvu": "^0.5.6",
42
38
  "watchlist": "^0.3.1"
43
39
  },
44
40
  "peerDependencies": {
45
41
  "solid-js": "^1.4.1"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup",
45
+ "test": "uvu -r solid-register",
46
+ "test:watch": "watchlist src test -- npm test"
46
47
  }
47
- }
48
+ }