mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-10-10 07:23:23 +08:00
编排添加类型判断
This commit is contained in:
@@ -4,6 +4,7 @@ const zlib = require("./zlib");
|
||||
const { htmlParser } = require("./htmlParser");
|
||||
const array = require("./array");
|
||||
const object = require("./object");
|
||||
const type = require("./type");
|
||||
const time = require("./time");
|
||||
const { regexTransform } = require("./regexTransform");
|
||||
|
||||
@@ -15,5 +16,6 @@ module.exports = {
|
||||
array,
|
||||
object,
|
||||
time,
|
||||
type,
|
||||
regexTransform,
|
||||
};
|
||||
|
12
plugin/lib/quickcomposer/data/type.js
Normal file
12
plugin/lib/quickcomposer/data/type.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const get = (value) => {
|
||||
return typeof value;
|
||||
};
|
||||
|
||||
const check = (value, type) => {
|
||||
return typeof value === type;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
get,
|
||||
check,
|
||||
};
|
Reference in New Issue
Block a user