@zodash/doreamon
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -6,2 +6,13 @@ # Change Log | ||
# 0.3.0 (2020-09-30) | ||
### Features | ||
* **doreamon:** add simple plugin mode for doreamon ([f5836ad](https://github.com/zcorky/zodash/commit/f5836ad029d8448f31fb7e858ea25a7330902d80)) | ||
# 0.2.0 (2020-09-28) | ||
@@ -8,0 +19,0 @@ |
import request from './request'; | ||
import date from './date'; | ||
import qs from './qs'; | ||
import event from './event'; | ||
import cookie from './cookie'; | ||
import storage from './storage'; | ||
import device from './device'; | ||
import uuid from './uuid'; | ||
import random from './random'; | ||
import is from './is'; | ||
import ms from './ms'; | ||
declare const _default: { | ||
import object from './object'; | ||
import array from './array'; | ||
import string from './string'; | ||
import func from './func'; | ||
export interface ICollections { | ||
request: typeof request; | ||
date: (date?: import("@zcorky/moment").IDate, options?: import("@zcorky/moment").Options) => import("@zcorky/moment").Moment; | ||
date: typeof date; | ||
qs: typeof qs; | ||
event: import("./event").IIEvent; | ||
storage: import("@zcorky/storage/lib/core").Storage; | ||
event: typeof event; | ||
storage: typeof storage; | ||
device: typeof device; | ||
cookie: { | ||
get: typeof import("./cookie").get; | ||
set: typeof import("./cookie").set; | ||
remove: typeof import("./cookie").remove; | ||
}; | ||
uuid: typeof import("@zodash/uuid").v4; | ||
random: { | ||
number: typeof import("@zodash/random").number; | ||
string: typeof import("@zodash/random").string; | ||
token: typeof import("@zodash/random").token; | ||
key: typeof import("@zodash/random").key; | ||
secret: typeof import("@zodash/random").secret; | ||
captcha: typeof import("@zodash/random").captcha; | ||
shortid: typeof import("@zodash/random").shortid; | ||
}; | ||
cookie: typeof cookie; | ||
uuid: typeof uuid; | ||
random: typeof random; | ||
is: typeof is; | ||
ms: typeof ms; | ||
object: { | ||
get: typeof import("@zodash/pick").pick; | ||
pick: typeof import("@zodash/get").get; | ||
omit: typeof import("@zodash/omit").omit; | ||
clone: (obj: import("@zcorky/deep-copy").Source) => string | number | boolean | object; | ||
equal: (objA: import("@zcorky/deep-copy").Source, objB: import("@zcorky/deep-copy").Source) => any; | ||
}; | ||
array: any; | ||
string: { | ||
format: typeof import("@zodash/format").format; | ||
}; | ||
func: { | ||
debounce: import("@zcorky/debounce").Debounce; | ||
throttle: import("@zcorky/throttle").Throttle; | ||
memoize: typeof import("@zodash/memoize").memoize; | ||
}; | ||
}; | ||
export default _default; | ||
object: typeof object; | ||
array: typeof array; | ||
string: typeof string; | ||
func: typeof func; | ||
use<T = any>(key: string, value: T): void; | ||
[key: string]: any; | ||
} | ||
export declare const collections: ICollections; | ||
export default collections; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.collections = void 0; | ||
const request_1 = require("./request"); | ||
@@ -18,3 +19,3 @@ const date_1 = require("./date"); | ||
const func_1 = require("./func"); | ||
exports.default = { | ||
exports.collections = { | ||
request: request_1.default, | ||
@@ -35,3 +36,10 @@ date: date_1.default, | ||
func: func_1.default, | ||
use: (key, value) => { | ||
if (exports.collections[key]) { | ||
throw new Error(`Doreamon cannot override ${key}`); | ||
} | ||
exports.collections[key] = value; | ||
}, | ||
}; | ||
exports.default = exports.collections; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@zodash/doreamon", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "utils like a doreamon", | ||
@@ -97,3 +97,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "1bd16aae857c9137ad6af46eb4116edb2f65d18d" | ||
"gitHead": "6a13c0514f7d72979593eba40aec8a1004c5f385" | ||
} |
Sorry, the diff of this file is not supported yet
38804
595