编排添加类型判断

This commit is contained in:
fofolee
2025-02-25 21:17:41 +08:00
parent 4cd05732a9
commit aff275fa7f
3 changed files with 68 additions and 0 deletions

View File

@@ -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,
};

View File

@@ -0,0 +1,12 @@
const get = (value) => {
return typeof value;
};
const check = (value, type) => {
return typeof value === type;
};
module.exports = {
get,
check,
};