yummies 3.4.0 → 4.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.
package/data.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare const isShallowEqual: (a: unknown, b: unknown) => boolean;
2
+ export declare const flatMapDeep: <TSource, TNewValue>(arr: TSource | TSource[], fn: (value: TSource, i: number, arr: TSource[]) => TNewValue) => TNewValue[];
2
3
  //# sourceMappingURL=data.d.ts.map
package/data.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,GAAI,GAAG,OAAO,EAAE,GAAG,OAAO,KAAG,OA8CvD,CAAC"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,GAAI,GAAG,OAAO,EAAE,GAAG,OAAO,KAAG,OA8CvD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,EAAE,SAAS,EAC5C,KAAK,OAAO,GAAG,OAAO,EAAE,EACxB,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,SAAS,KAC3D,SAAS,EAGa,CAAC"}
package/data.js CHANGED
@@ -39,3 +39,6 @@ export const isShallowEqual = (a, b) => {
39
39
  }
40
40
  return true;
41
41
  };
42
+ export const flatMapDeep = (arr, fn) => Array.isArray(arr)
43
+ ? arr.flatMap((c) => flatMapDeep(c, fn))
44
+ : [fn(arr, 0, [arr])];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yummies",
3
- "version": "3.4.0",
3
+ "version": "4.0.0",
4
4
  "keywords": [],
5
5
  "author": "js2me",
6
6
  "license": "MIT",
@@ -127,11 +127,6 @@
127
127
  "default": "./imports.js",
128
128
  "types": "./imports.d.ts"
129
129
  },
130
- ".": {
131
- "import": "./index.js",
132
- "default": "./index.js",
133
- "types": "./index.d.ts"
134
- },
135
130
  "./math": {
136
131
  "import": "./math.js",
137
132
  "default": "./math.js",
@@ -208,8 +203,6 @@
208
203
  "files": [
209
204
  "*"
210
205
  ],
211
- "main": "./index.js",
212
- "typings": "./index.d.ts",
213
206
  "scripts": {
214
207
  "clean": "rimraf dist",
215
208
  "lint:check": "eslint . --fix",
package/index.d.ts DELETED
@@ -1,25 +0,0 @@
1
- export * from './complex/index.js';
2
- export * from './type-guard/index.js';
3
- export * from './utils/types.js';
4
- export * from './async.js';
5
- export * from './common.js';
6
- export * from './cookie.js';
7
- export * from './css.js';
8
- export * from './data.js';
9
- export * from './date-time.js';
10
- export * from './device.js';
11
- export * from './encodings.js';
12
- export * from './file.js';
13
- export * from './html.js';
14
- export * from './id.js';
15
- export * from './imports.js';
16
- export * from './math.js';
17
- export * from './media.js';
18
- export * from './ms.js';
19
- export * from './price.js';
20
- export * from './random.js';
21
- export * from './sound.js';
22
- export * from './storage.js';
23
- export * from './text.js';
24
- export * from './vibrate.js';
25
- //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
package/index.js DELETED
@@ -1,24 +0,0 @@
1
- export * from './complex/index.js';
2
- export * from './type-guard/index.js';
3
- export * from './utils/types.js';
4
- export * from './async.js';
5
- export * from './common.js';
6
- export * from './cookie.js';
7
- export * from './css.js';
8
- export * from './data.js';
9
- export * from './date-time.js';
10
- export * from './device.js';
11
- export * from './encodings.js';
12
- export * from './file.js';
13
- export * from './html.js';
14
- export * from './id.js';
15
- export * from './imports.js';
16
- export * from './math.js';
17
- export * from './media.js';
18
- export * from './ms.js';
19
- export * from './price.js';
20
- export * from './random.js';
21
- export * from './sound.js';
22
- export * from './storage.js';
23
- export * from './text.js';
24
- export * from './vibrate.js';