1.0.0 • Published 3 years ago

lianxi2-wh v1.0.0

Weekly downloads
84
License
ISC
Repository
-
Last release
3 years ago
const fs = require("fs")
const Mock = require("mockjs");
const data = Mock.mock({
    "user|5": [{
        "user": "@cname",
        "pwd": "@word(6)",
        "tel": /^1[3-9]\d{9}$/,
        "email": /^\w+@\w+\.(com|net|con)$/,
        "nikename": "@cname",
        "birth": /19[2-9][0-9]-[1-9]-[1-9]/,
        "id":"@id"
    }]
})

fs.writeFileSync("user.json",JSON.stringify(data.user))
1.0.0

3 years ago