@lee-zg/melange 1.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/LICENSE +21 -0
- package/README.md +256 -0
- package/dist/chunk-2PXWQDZC.js +659 -0
- package/dist/chunk-2PXWQDZC.js.map +1 -0
- package/dist/chunk-352XNR3C.js +716 -0
- package/dist/chunk-352XNR3C.js.map +1 -0
- package/dist/chunk-7QVYU63E.js +6 -0
- package/dist/chunk-7QVYU63E.js.map +1 -0
- package/dist/chunk-ALBD5XC5.js +285 -0
- package/dist/chunk-ALBD5XC5.js.map +1 -0
- package/dist/chunk-O7K662J5.cjs +842 -0
- package/dist/chunk-O7K662J5.cjs.map +1 -0
- package/dist/chunk-PK6SKIKE.cjs +8 -0
- package/dist/chunk-PK6SKIKE.cjs.map +1 -0
- package/dist/chunk-Q73NOVWX.cjs +789 -0
- package/dist/chunk-Q73NOVWX.cjs.map +1 -0
- package/dist/chunk-Q7XG6YN6.cjs +682 -0
- package/dist/chunk-Q7XG6YN6.cjs.map +1 -0
- package/dist/chunk-YGMBCZJQ.js +833 -0
- package/dist/chunk-YGMBCZJQ.js.map +1 -0
- package/dist/chunk-ZT6HVG4G.cjs +330 -0
- package/dist/chunk-ZT6HVG4G.cjs.map +1 -0
- package/dist/core/index.cjs +97 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +718 -0
- package/dist/core/index.d.ts +718 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -0
- package/dist/fp/index.cjs +185 -0
- package/dist/fp/index.cjs.map +1 -0
- package/dist/fp/index.d.cts +913 -0
- package/dist/fp/index.d.ts +913 -0
- package/dist/fp/index.js +4 -0
- package/dist/fp/index.js.map +1 -0
- package/dist/index.cjs +608 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +39 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/index.cjs +41 -0
- package/dist/plugins/index.cjs.map +1 -0
- package/dist/plugins/index.d.cts +643 -0
- package/dist/plugins/index.d.ts +643 -0
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/types-BtOUCLB-.d.cts +293 -0
- package/dist/types-BtOUCLB-.d.ts +293 -0
- package/dist/utils/index.cjs +297 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +1179 -0
- package/dist/utils/index.d.ts +1179 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +132 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export { A as AnyFunction, h as AsyncFunction, i as AsyncThunk, B as BinaryFunction, y as Brand, r as ClassDecorator, b as Comparator, C as Constructor, c as CurriedBinaryFunction, k as DeepPartial, l as DeepReadonly, D as Deferred, j as Dictionary, G as Email, E as Err, v as EventHandler, w as EventListener, H as Head, Y as JsonArray, X as JsonObject, W as JsonValue, K as Keys, M as Mapper, s as MethodDecorator, Q as Mutable, F as NonEmptyString, f as None, N as Nullable, d as Ok, g as Option, O as Optional, n as OptionalKeys, o as Pair, u as ParameterDecorator, L as ParametersOf, z as PositiveNumber, a as Predicate, P as Primitive, t as PropertyDecorator, R as Reducer, m as RequiredKeys, e as Result, J as ReturnTypeOf, S as Some, x as Subscription, q as Tail, T as Thunk, p as Triple, I as UUID, U as UnaryFunction, V as Values } from './types-BtOUCLB-.js';
|
|
2
|
+
export { allPass, alt, anyPass, apply, compose, constant, curry, err, filterOption, flatMapOption, flatMapResult, flip, flow, fromNullable, getOrElse, getOrElseL, identity, invert, isErr, isNone, isOk, isSome, mapOption, mapResult, matchOption, matchResult, memoize, none, noop, not, ok, once, partial, partialRight, pipe, some, tap, thunk, toNullable, tryCatch, tryCatchAsync, uncurry, unwrapOr, unwrapOrElse } from './fp/index.js';
|
|
3
|
+
export { camelCase, capitalize, chunk, collapseWhitespace, constantCase, countOccurrences, createDeferred, debounce, deepClone, deepMerge, delay, difference, escapeHtml, filterObject, first, flatten, flattenDeep, get, groupBy, has, intersection, isArray, isBoolean, isDate, isEmail, isEmpty, isFunction, isInRange, isInteger, isNegative, isNil, isNotEmpty, isNotNil, isNumber, isObject, isPlainObject, isPositive, isPromise, isString, 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 } from './utils/index.js';
|
|
4
|
+
export { Bind, Container, Debounce, Deprecated, Disposable, DisposableStore, EventEmitter, Frozen, Inject, Injectable, Lifecycle, Log, Memoize, Retry, Sealed, Singleton, Throttle, Timeout, Validate, combineDisposables, globalContainer, toDisposable } from './core/index.js';
|
|
5
|
+
export { AWSSpeechConfig, AzureSpeechConfig, BaseSpeechConfig, CustomProviderConfig, GoogleSpeechConfig, ProviderConfig, RecognitionConfig, RecognitionEvent, RecognitionEventHandler, RecognitionEventType, RecognitionProvider, RecognitionResult, RecognitionResultItem, SpeechError, SpeechProviderType, SpeechRecognizer, SpeechRecognizerImpl, SpeechServiceStatus, SpeechSynthesizer, SpeechSynthesizerImpl, SynthesisConfig, SynthesisEvent, SynthesisEventHandler, SynthesisEventType, SynthesisProvider, VoiceInfo, createSpeechRecognizer, createSpeechSynthesizer, isSpeechRecognitionSupported, isSpeechSynthesisSupported, listen, speak } from './plugins/index.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Melange 库的主入口点
|
|
9
|
+
* @module melange
|
|
10
|
+
* @description 一个现代化的 JavaScript/TypeScript 工具库,具有
|
|
11
|
+
* 函数式编程模式、面向对象工具和全面的类型支持。
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* // 导入所有内容
|
|
16
|
+
* import * as melange from 'melange';
|
|
17
|
+
*
|
|
18
|
+
* // 导入特定模块
|
|
19
|
+
* import { pipe, compose, curry } from 'melange/fp';
|
|
20
|
+
* import { debounce, throttle, deepClone } from 'melange/utils';
|
|
21
|
+
* import { EventEmitter, Container } from 'melange/core';
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @license MIT
|
|
25
|
+
* @author Melange 贡献者
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 当前库版本
|
|
30
|
+
* @constant
|
|
31
|
+
*/
|
|
32
|
+
declare const VERSION = "1.0.0";
|
|
33
|
+
/**
|
|
34
|
+
* 库名
|
|
35
|
+
* @constant
|
|
36
|
+
*/
|
|
37
|
+
declare const LIBRARY_NAME = "melange";
|
|
38
|
+
|
|
39
|
+
export { LIBRARY_NAME, VERSION };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { allPass, alt, anyPass, apply, compose, constant, curry, err, filterOption, flatMapOption, flatMapResult, flip, flow, fromNullable, getOrElse, getOrElseL, identity, invert, isErr, isNone, isOk, isSome, mapOption, mapResult, matchOption, matchResult, memoize, none, noop, not, ok, once, partial, partialRight, pipe, some, tap, thunk, toNullable, tryCatch, tryCatchAsync, uncurry, unwrapOr, unwrapOrElse } from './chunk-ALBD5XC5.js';
|
|
2
|
+
export { camelCase, capitalize, chunk, collapseWhitespace, constantCase, countOccurrences, createDeferred, debounce, deepClone, deepMerge, delay, difference, escapeHtml, filterObject, first, flatten, flattenDeep, get, groupBy, has, intersection, isArray, isBoolean, isDate, isEmail, isEmpty, isFunction, isInRange, isInteger, isNegative, isNil, isNotEmpty, isNotNil, isNumber, isObject, isPlainObject, isPositive, isPromise, isString, 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 } from './chunk-352XNR3C.js';
|
|
3
|
+
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-2PXWQDZC.js';
|
|
4
|
+
export { SpeechRecognizerImpl, SpeechSynthesizerImpl, createSpeechRecognizer, createSpeechSynthesizer, isSpeechRecognitionSupported, isSpeechSynthesisSupported, listen, speak } from './chunk-YGMBCZJQ.js';
|
|
5
|
+
import './chunk-7QVYU63E.js';
|
|
6
|
+
|
|
7
|
+
// src/index.ts
|
|
8
|
+
var VERSION = "1.0.0";
|
|
9
|
+
var LIBRARY_NAME = "melange";
|
|
10
|
+
/**
|
|
11
|
+
* @fileoverview Melange 库的主入口点
|
|
12
|
+
* @module melange
|
|
13
|
+
* @description 一个现代化的 JavaScript/TypeScript 工具库,具有
|
|
14
|
+
* 函数式编程模式、面向对象工具和全面的类型支持。
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* // 导入所有内容
|
|
19
|
+
* import * as melange from 'melange';
|
|
20
|
+
*
|
|
21
|
+
* // 导入特定模块
|
|
22
|
+
* import { pipe, compose, curry } from 'melange/fp';
|
|
23
|
+
* import { debounce, throttle, deepClone } from 'melange/utils';
|
|
24
|
+
* import { EventEmitter, Container } from 'melange/core';
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @license MIT
|
|
28
|
+
* @author Melange 贡献者
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export { LIBRARY_NAME, VERSION };
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAyTO,IAAM,OAAA,GAAU;AAMhB,IAAM,YAAA,GAAe","file":"index.js","sourcesContent":["/**\n * @fileoverview Melange 库的主入口点\n * @module melange\n * @description 一个现代化的 JavaScript/TypeScript 工具库,具有\n * 函数式编程模式、面向对象工具和全面的类型支持。\n *\n * @example\n * ```typescript\n * // 导入所有内容\n * import * as melange from 'melange';\n *\n * // 导入特定模块\n * import { pipe, compose, curry } from 'melange/fp';\n * import { debounce, throttle, deepClone } from 'melange/utils';\n * import { EventEmitter, Container } from 'melange/core';\n * ```\n *\n * @license MIT\n * @author Melange 贡献者\n */\n\n// ============================================================================\n// 类型导出\n// ============================================================================\n\nexport type {\n // 基本类型\n Nullable,\n Optional,\n Primitive,\n AnyFunction,\n Constructor,\n // 函数类型\n Thunk,\n Predicate,\n Mapper,\n Reducer,\n Comparator,\n UnaryFunction,\n BinaryFunction,\n CurriedBinaryFunction,\n // Result 和 Option 类型\n Ok,\n Err,\n Result,\n Some,\n None,\n Option,\n // 异步类型\n AsyncFunction,\n AsyncThunk,\n Deferred,\n // 对象类型\n Dictionary,\n DeepPartial,\n DeepReadonly,\n RequiredKeys,\n OptionalKeys,\n Keys,\n Values,\n // 元组类型\n Pair,\n Triple,\n Head,\n Tail,\n // 装饰器类型\n ClassDecorator,\n MethodDecorator,\n PropertyDecorator,\n ParameterDecorator,\n // 事件类型\n EventHandler,\n EventListener,\n Subscription,\n // 品牌类型\n Brand,\n PositiveNumber,\n NonEmptyString,\n Email,\n UUID,\n // 实用类型\n ReturnTypeOf,\n ParametersOf,\n Mutable,\n JsonValue,\n JsonObject,\n JsonArray,\n} from './types';\n\n// ============================================================================\n// 函数式编程模块\n// ============================================================================\n\nexport {\n // 函数组合\n pipe,\n compose,\n flow,\n // 柯里化\n curry,\n uncurry,\n partial,\n partialRight,\n // Result 类型工具\n ok,\n err,\n isOk,\n isErr,\n mapResult,\n flatMapResult,\n unwrapOr,\n unwrapOrElse,\n matchResult,\n tryCatch,\n tryCatchAsync,\n // Option 类型工具\n some,\n none,\n isSome,\n isNone,\n fromNullable,\n mapOption,\n flatMapOption,\n getOrElse,\n getOrElseL,\n matchOption,\n toNullable,\n filterOption,\n alt,\n // 高阶函数\n memoize,\n once,\n tap,\n identity,\n constant,\n noop,\n not,\n allPass,\n anyPass,\n flip,\n apply,\n thunk,\n invert,\n} from './fp';\n\n// ============================================================================\n// 实用函数模块\n// ============================================================================\n\nexport {\n // 对象工具\n deepClone,\n deepMerge,\n pick,\n omit,\n get,\n set,\n has,\n isPlainObject,\n mapValues,\n filterObject,\n // 数组工具\n chunk,\n flatten,\n flattenDeep,\n unique,\n groupBy,\n sortBy,\n partition,\n zip,\n first,\n last,\n sample,\n shuffle,\n range,\n intersection,\n difference,\n // 字符串工具\n capitalize,\n camelCase,\n pascalCase,\n snakeCase,\n kebabCase,\n constantCase,\n truncate,\n padStart,\n padEnd,\n collapseWhitespace,\n escapeHtml,\n unescapeHtml,\n randomString,\n words,\n titleCase,\n reverse,\n countOccurrences,\n // 计时工具\n debounce,\n throttle,\n delay,\n retry,\n timeout,\n createDeferred,\n parallel,\n sequence,\n // 类型守卫\n isString,\n isNumber,\n isBoolean,\n isObject,\n isArray,\n isFunction,\n isNil,\n isNotNil,\n isEmpty,\n isNotEmpty,\n isDate,\n isPromise,\n // 验证工具\n isEmail,\n isUUID,\n isURL,\n isInteger,\n isPositive,\n isNegative,\n isInRange,\n} from './utils';\n\n// ============================================================================\n// 核心面向对象模块\n// ============================================================================\n\nexport {\n // 事件处理\n EventEmitter,\n // 依赖注入\n Container,\n globalContainer,\n Lifecycle,\n Injectable,\n Inject,\n Singleton,\n // 装饰器\n Memoize,\n Debounce,\n Throttle,\n Log,\n Validate,\n Deprecated,\n Sealed,\n Frozen,\n Bind,\n Retry,\n Timeout,\n // 基础类\n Disposable,\n DisposableStore,\n toDisposable,\n combineDisposables,\n} from './core';\n\n// ============================================================================\n// 插件模块\n// ============================================================================\n\nexport {\n // 语音合成\n SpeechSynthesizerImpl,\n createSpeechSynthesizer,\n isSpeechSynthesisSupported,\n speak,\n // 语音识别\n SpeechRecognizerImpl,\n createSpeechRecognizer,\n isSpeechRecognitionSupported,\n listen,\n} from './plugins';\n\n// 语音模块类型导出\nexport type {\n SpeechProviderType,\n SpeechServiceStatus,\n SpeechError,\n BaseSpeechConfig,\n VoiceInfo,\n SynthesisConfig,\n SynthesisEventType,\n SynthesisEvent,\n SynthesisEventHandler,\n SynthesisProvider,\n SpeechSynthesizer,\n RecognitionResultItem,\n RecognitionResult,\n RecognitionConfig,\n RecognitionEventType,\n RecognitionEvent,\n RecognitionEventHandler,\n RecognitionProvider,\n SpeechRecognizer,\n AzureSpeechConfig,\n GoogleSpeechConfig,\n AWSSpeechConfig,\n CustomProviderConfig,\n ProviderConfig,\n} from './plugins';\n\n// ============================================================================\n// 库版本\n// ============================================================================\n\n/**\n * 当前库版本\n * @constant\n */\nexport const VERSION = '1.0.0';\n\n/**\n * 库名\n * @constant\n */\nexport const LIBRARY_NAME = 'melange';\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkO7K662J5_cjs = require('../chunk-O7K662J5.cjs');
|
|
4
|
+
require('../chunk-PK6SKIKE.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "SpeechRecognizerImpl", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkO7K662J5_cjs.SpeechRecognizerImpl; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "SpeechSynthesizerImpl", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkO7K662J5_cjs.SpeechSynthesizerImpl; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "createSpeechRecognizer", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkO7K662J5_cjs.createSpeechRecognizer; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "createSpeechSynthesizer", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkO7K662J5_cjs.createSpeechSynthesizer; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "isSpeechRecognitionSupported", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkO7K662J5_cjs.isSpeechRecognitionSupported; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "isSpeechSynthesisSupported", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkO7K662J5_cjs.isSpeechSynthesisSupported; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "listen", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkO7K662J5_cjs.listen; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "speak", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkO7K662J5_cjs.speak; }
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=index.cjs.map
|
|
41
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|