ctx-core 3.2.2 → 3.3.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/all/ctx/index.js CHANGED
@@ -1,12 +1,9 @@
1
- import { flatten } from '../flatten/index.js'
2
- import { isArray } from '../isArray/index.js'
3
- const ctx_sym = Symbol.for('ctx')
4
1
  /**
5
2
  * @returns {import('../be_/index.js').MapCtx}
6
3
  * @private
7
4
  */
8
5
  export function ctx__new() {
9
- return new Map([[ctx_sym, true]])
6
+ return new Map([[Symbol.for('ctx'), true]])
10
7
  }
11
8
  export { ctx__new as ctx_ }
12
9
  /**
@@ -15,9 +12,9 @@ export { ctx__new as ctx_ }
15
12
  * @private
16
13
  */
17
14
  export function is_ctx_(val) {
18
- if (!isArray(val)) return !!(val instanceof Map && val.get(ctx_sym))
15
+ if (!Array.isArray(val)) return !!(val instanceof Map && val.get(Symbol.for('ctx')))
19
16
  if (!val.length) return false
20
- const flat__val = flatten(val)
17
+ let flat__val = val.flat(Infinity)
21
18
  for (let i = 0; i < flat__val.length; i++) {
22
19
  if (!is_ctx_(flat__val[i])) return false
23
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-core",
3
- "version": "3.2.2",
3
+ "version": "3.3.1",
4
4
  "description": "ctx-core core library",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -125,25 +125,32 @@
125
125
  "sideEffects": false,
126
126
  "size-limit": [
127
127
  {
128
- "name": "be",
128
+ "name": "be_",
129
129
  "import": {
130
130
  "./be": "{ be_ }"
131
131
  },
132
132
  "limit": "398 B"
133
133
  },
134
134
  {
135
- "name": "rmemo",
135
+ "name": "rmemo_",
136
136
  "import": {
137
137
  "./rmemo": "{ rmemo_ }"
138
138
  },
139
139
  "limit": "358 B"
140
140
  },
141
141
  {
142
- "name": "rmemo signal",
142
+ "name": "rmemo_ signal_",
143
143
  "import": {
144
- "./rmemo": "{ rsig_ }"
144
+ "./rmemo": "{ rsig_, rmemo_ }"
145
145
  },
146
- "limit": "385 B"
146
+ "limit": "387 B"
147
+ },
148
+ {
149
+ "name": "rmemo_ signal_ be_ ctx_",
150
+ "import": {
151
+ "./rmemo": "{ rsig_, rmemo_, be_, ctx_ }"
152
+ },
153
+ "limit": "771 B"
147
154
  }
148
155
  ],
149
156
  "scripts": {
package/rmemo/index.d.ts CHANGED
@@ -1 +1,3 @@
1
+ export * from '../all/be_/index.js'
2
+ export * from '../all/ctx/index.js'
1
3
  export * from '../all/rmemo/index.js'
package/rmemo/index.js CHANGED
@@ -1 +1,3 @@
1
+ export * from '../all/be_/index.js'
2
+ export * from '../all/ctx/index.js'
1
3
  export * from '../all/rmemo/index.js'