@lee-zg/melange 1.2.0 → 1.2.3

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/README.md CHANGED
@@ -5,10 +5,10 @@
5
5
  </p>
6
6
 
7
7
  <p align="center">
8
- <img alt="npm version" src="https://img.shields.io/npm/v/melange">
9
- <img alt="License" src="https://img.shields.io/npm/l/melange">
8
+ <img alt="npm version" src="https://img.shields.io/npm/v/@lee-zg/melange">
9
+ <img alt="License" src="https://img.shields.io/npm/l/@lee-zg/melange">
10
10
  <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-5.0+-blue">
11
- <img alt="Bundle Size" src="https://img.shields.io/bundlephobia/minzip/melange">
11
+ <img alt="Bundle Size" src="https://img.shields.io/bundlephobia/minzip/@lee-zg/melange">
12
12
  </p>
13
13
 
14
14
  ## 特性
@@ -25,19 +25,19 @@
25
25
 
26
26
  ```bash
27
27
  # npm
28
- npm install melange
28
+ npm install @lee-zg/melange
29
29
 
30
30
  # yarn
31
- yarn add melange
31
+ yarn add @lee-zg/melange
32
32
 
33
33
  # pnpm
34
- pnpm add melange
34
+ pnpm add @lee-zg/melange
35
35
  ```
36
36
 
37
37
  ## 快速开始
38
38
 
39
39
  ```typescript
40
- import { pipe, curry, debounce, EventEmitter } from 'melange';
40
+ import { pipe, curry, debounce, EventEmitter } from '@lee-zg/melange';
41
41
 
42
42
  // 函数式编程
43
43
  const result = pipe(
@@ -68,7 +68,7 @@ emitter.emit('message', 'Hello, World!');
68
68
 
69
69
  Melange 组织为三个主要模块:
70
70
 
71
- ### 函数式编程 (`melange/fp`)
71
+ ### 函数式编程 (`@lee-zg/melange/fp`)
72
72
 
73
73
  ```typescript
74
74
  import {
@@ -77,10 +77,10 @@ import {
77
77
  ok, err, mapResult, // Result 类型(错误处理)
78
78
  some, none, mapOption, // Option 类型(可空值处理)
79
79
  memoize, once, identity // 高阶函数
80
- } from 'melange/fp';
80
+ } from '@lee-zg/melange/fp';
81
81
  ```
82
82
 
83
- ### 实用工具 (`melange/utils`)
83
+ ### 实用工具 (`@lee-zg/melange/utils`)
84
84
 
85
85
  ```typescript
86
86
  import {
@@ -89,10 +89,10 @@ import {
89
89
  camelCase, snakeCase, truncate, // 字符串工具
90
90
  debounce, throttle, delay, retry, // 计时工具
91
91
  isString, isNumber, isEmail // 类型守卫
92
- } from 'melange/utils';
92
+ } from '@lee-zg/melange/utils';
93
93
  ```
94
94
 
95
- ### 核心面向对象 (`melange/core`)
95
+ ### 核心面向对象 (`@lee-zg/melange/core`)
96
96
 
97
97
  ```typescript
98
98
  import {
@@ -100,7 +100,7 @@ import {
100
100
  Container, Injectable, Inject, // 依赖注入
101
101
  Memoize, Debounce, Throttle, Log, // 方法装饰器
102
102
  Disposable, DisposableStore // 资源管理
103
- } from 'melange/core';
103
+ } from '@lee-zg/melange/core';
104
104
  ```
105
105
 
106
106
  ## API 参考
@@ -234,7 +234,7 @@ import type {
234
234
  Predicate, Mapper, Reducer,
235
235
  DeepPartial, DeepReadonly,
236
236
  Brand, NonEmptyString, Email
237
- } from 'melange';
237
+ } from '@lee-zg/melange';
238
238
  ```
239
239
 
240
240
  ## 浏览器支持
@@ -676,5 +676,5 @@ exports.Validate = Validate;
676
676
  exports.combineDisposables = combineDisposables;
677
677
  exports.globalContainer = globalContainer;
678
678
  exports.toDisposable = toDisposable;
679
- //# sourceMappingURL=chunk-V5THPEB2.cjs.map
680
- //# sourceMappingURL=chunk-V5THPEB2.cjs.map
679
+ //# sourceMappingURL=chunk-BEY4UAYF.cjs.map
680
+ //# sourceMappingURL=chunk-BEY4UAYF.cjs.map
@@ -695,5 +695,5 @@ function isInRange(value, min, max) {
695
695
  __name(isInRange, "isInRange");
696
696
 
697
697
  export { camelCase, capitalize, chunk, collapseWhitespace, constantCase, countOccurrences, createDeferred, debounce, deepClone, deepMerge, delay, difference, escapeHtml, filterObject, first, flatten, flattenDeep, fromEntries, get, groupBy, has, intersection, isArray, isBigInt, isBoolean, isDate, isEmail, isEmpty, isFunction, isInRange, isInteger, isNegative, isNil, isNotEmpty, isNotNil, isNumber, isObject, isPlainObject, isPositive, isPromise, isString, isSymbol, isURL, isUUID, kebabCase, last, mapValues, omit, padEnd, padStart, parallel, partition, pascalCase, pick, randomString, range, retry, reverse, sample, sequence, set, shuffle, snakeCase, sortBy, throttle, timeout, titleCase, truncate, unescapeHtml, unique, words, zip };
698
- //# sourceMappingURL=chunk-VGZMISJD.js.map
699
- //# sourceMappingURL=chunk-VGZMISJD.js.map
698
+ //# sourceMappingURL=chunk-GZBY4BUP.js.map
699
+ //# sourceMappingURL=chunk-GZBY4BUP.js.map
@@ -653,5 +653,5 @@ function combineDisposables(...disposables) {
653
653
  __name(combineDisposables, "combineDisposables");
654
654
 
655
655
  export { Bind, Container, Debounce, Deprecated, Disposable, DisposableStore, EventEmitter, Frozen, Inject, Injectable, Lifecycle, Log, Memoize, Retry, Sealed, Singleton, Throttle, Timeout, Validate, combineDisposables, globalContainer, toDisposable };
656
- //# sourceMappingURL=chunk-MBBJMHTS.js.map
657
- //# sourceMappingURL=chunk-MBBJMHTS.js.map
656
+ //# sourceMappingURL=chunk-ILNGTDQ4.js.map
657
+ //# sourceMappingURL=chunk-ILNGTDQ4.js.map
@@ -768,5 +768,5 @@ exports.unescapeHtml = unescapeHtml;
768
768
  exports.unique = unique;
769
769
  exports.words = words;
770
770
  exports.zip = zip;
771
- //# sourceMappingURL=chunk-KUJARU3D.cjs.map
772
- //# sourceMappingURL=chunk-KUJARU3D.cjs.map
771
+ //# sourceMappingURL=chunk-JLBTZPBY.cjs.map
772
+ //# sourceMappingURL=chunk-JLBTZPBY.cjs.map
@@ -1,97 +1,97 @@
1
1
  'use strict';
2
2
 
3
- var chunkV5THPEB2_cjs = require('../chunk-V5THPEB2.cjs');
3
+ var chunkBEY4UAYF_cjs = require('../chunk-BEY4UAYF.cjs');
4
4
  require('../chunk-PK6SKIKE.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Bind", {
9
9
  enumerable: true,
10
- get: function () { return chunkV5THPEB2_cjs.Bind; }
10
+ get: function () { return chunkBEY4UAYF_cjs.Bind; }
11
11
  });
12
12
  Object.defineProperty(exports, "Container", {
13
13
  enumerable: true,
14
- get: function () { return chunkV5THPEB2_cjs.Container; }
14
+ get: function () { return chunkBEY4UAYF_cjs.Container; }
15
15
  });
16
16
  Object.defineProperty(exports, "Debounce", {
17
17
  enumerable: true,
18
- get: function () { return chunkV5THPEB2_cjs.Debounce; }
18
+ get: function () { return chunkBEY4UAYF_cjs.Debounce; }
19
19
  });
20
20
  Object.defineProperty(exports, "Deprecated", {
21
21
  enumerable: true,
22
- get: function () { return chunkV5THPEB2_cjs.Deprecated; }
22
+ get: function () { return chunkBEY4UAYF_cjs.Deprecated; }
23
23
  });
24
24
  Object.defineProperty(exports, "Disposable", {
25
25
  enumerable: true,
26
- get: function () { return chunkV5THPEB2_cjs.Disposable; }
26
+ get: function () { return chunkBEY4UAYF_cjs.Disposable; }
27
27
  });
28
28
  Object.defineProperty(exports, "DisposableStore", {
29
29
  enumerable: true,
30
- get: function () { return chunkV5THPEB2_cjs.DisposableStore; }
30
+ get: function () { return chunkBEY4UAYF_cjs.DisposableStore; }
31
31
  });
32
32
  Object.defineProperty(exports, "EventEmitter", {
33
33
  enumerable: true,
34
- get: function () { return chunkV5THPEB2_cjs.EventEmitter; }
34
+ get: function () { return chunkBEY4UAYF_cjs.EventEmitter; }
35
35
  });
36
36
  Object.defineProperty(exports, "Frozen", {
37
37
  enumerable: true,
38
- get: function () { return chunkV5THPEB2_cjs.Frozen; }
38
+ get: function () { return chunkBEY4UAYF_cjs.Frozen; }
39
39
  });
40
40
  Object.defineProperty(exports, "Inject", {
41
41
  enumerable: true,
42
- get: function () { return chunkV5THPEB2_cjs.Inject; }
42
+ get: function () { return chunkBEY4UAYF_cjs.Inject; }
43
43
  });
44
44
  Object.defineProperty(exports, "Injectable", {
45
45
  enumerable: true,
46
- get: function () { return chunkV5THPEB2_cjs.Injectable; }
46
+ get: function () { return chunkBEY4UAYF_cjs.Injectable; }
47
47
  });
48
48
  Object.defineProperty(exports, "Lifecycle", {
49
49
  enumerable: true,
50
- get: function () { return chunkV5THPEB2_cjs.Lifecycle; }
50
+ get: function () { return chunkBEY4UAYF_cjs.Lifecycle; }
51
51
  });
52
52
  Object.defineProperty(exports, "Log", {
53
53
  enumerable: true,
54
- get: function () { return chunkV5THPEB2_cjs.Log; }
54
+ get: function () { return chunkBEY4UAYF_cjs.Log; }
55
55
  });
56
56
  Object.defineProperty(exports, "Memoize", {
57
57
  enumerable: true,
58
- get: function () { return chunkV5THPEB2_cjs.Memoize; }
58
+ get: function () { return chunkBEY4UAYF_cjs.Memoize; }
59
59
  });
60
60
  Object.defineProperty(exports, "Retry", {
61
61
  enumerable: true,
62
- get: function () { return chunkV5THPEB2_cjs.Retry; }
62
+ get: function () { return chunkBEY4UAYF_cjs.Retry; }
63
63
  });
64
64
  Object.defineProperty(exports, "Sealed", {
65
65
  enumerable: true,
66
- get: function () { return chunkV5THPEB2_cjs.Sealed; }
66
+ get: function () { return chunkBEY4UAYF_cjs.Sealed; }
67
67
  });
68
68
  Object.defineProperty(exports, "Singleton", {
69
69
  enumerable: true,
70
- get: function () { return chunkV5THPEB2_cjs.Singleton; }
70
+ get: function () { return chunkBEY4UAYF_cjs.Singleton; }
71
71
  });
72
72
  Object.defineProperty(exports, "Throttle", {
73
73
  enumerable: true,
74
- get: function () { return chunkV5THPEB2_cjs.Throttle; }
74
+ get: function () { return chunkBEY4UAYF_cjs.Throttle; }
75
75
  });
76
76
  Object.defineProperty(exports, "Timeout", {
77
77
  enumerable: true,
78
- get: function () { return chunkV5THPEB2_cjs.Timeout; }
78
+ get: function () { return chunkBEY4UAYF_cjs.Timeout; }
79
79
  });
80
80
  Object.defineProperty(exports, "Validate", {
81
81
  enumerable: true,
82
- get: function () { return chunkV5THPEB2_cjs.Validate; }
82
+ get: function () { return chunkBEY4UAYF_cjs.Validate; }
83
83
  });
84
84
  Object.defineProperty(exports, "combineDisposables", {
85
85
  enumerable: true,
86
- get: function () { return chunkV5THPEB2_cjs.combineDisposables; }
86
+ get: function () { return chunkBEY4UAYF_cjs.combineDisposables; }
87
87
  });
88
88
  Object.defineProperty(exports, "globalContainer", {
89
89
  enumerable: true,
90
- get: function () { return chunkV5THPEB2_cjs.globalContainer; }
90
+ get: function () { return chunkBEY4UAYF_cjs.globalContainer; }
91
91
  });
92
92
  Object.defineProperty(exports, "toDisposable", {
93
93
  enumerable: true,
94
- get: function () { return chunkV5THPEB2_cjs.toDisposable; }
94
+ get: function () { return chunkBEY4UAYF_cjs.toDisposable; }
95
95
  });
96
96
  //# sourceMappingURL=index.cjs.map
97
97
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- export { Bind, Container, Debounce, Deprecated, Disposable, DisposableStore, EventEmitter, Frozen, Inject, Injectable, Lifecycle, Log, Memoize, Retry, Sealed, Singleton, Throttle, Timeout, Validate, combineDisposables, globalContainer, toDisposable } from '../chunk-MBBJMHTS.js';
1
+ export { Bind, Container, Debounce, Deprecated, Disposable, DisposableStore, EventEmitter, Frozen, Inject, Injectable, Lifecycle, Log, Memoize, Retry, Sealed, Singleton, Throttle, Timeout, Validate, combineDisposables, globalContainer, toDisposable } from '../chunk-ILNGTDQ4.js';
2
2
  import '../chunk-7QVYU63E.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map