Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 490 Bytes

README.md

File metadata and controls

34 lines (21 loc) · 490 Bytes

快速入门

0. 安装

推荐通过npm安装

npm i -S @litert/typeguard

在 Node.js 中使用:

import * as TyG from "@litert/typeguard";

const tgc = createJavaScriptCompiler();

const isValidString = tgc.compile(
  "string(1,255)"
);

console.log(isValidString("FF")); // true
console.log(isValidString("")); // false
console.log(isValidString(null)); // false

1. 语法简介

点击查看

2. 接口说明

点击查看