JSON 数据生产库 DreamJS

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-03 13:12:31

软件介绍

DreamJS 是一个轻量级的 JavaScript 库,可以用来产生 JSON 数据。这个库可以通过使用标准的类型,如字符串、数值、日期、布尔、常量,从 JSON Schema 中输出随机的数据。

示例代码:

dream.customType('pi', function () {  return Math.PI;
});dream.customType('hello', /hello+ (world|to you)/);

dream
  .schema({
    name: 'name',
    age: 'age',
    address: 'address',
    contact: {
      phone: 'phone',
      servicePhone: /^(800[1-9]{6})$/
    },    foo: function () {      return 'bar';
    },
    pi: 'pi',
    hello: 'hello'
  })
  .generateRnd(2)
  .output(function (err, result) {    console.log(result);
  });

本文地址:https://codercto.com/soft/d/22569.html

You Can Program in C++

You Can Program in C++

Francis Glassborow / John Wiley & Sons / 2006-7 / 406.80元

An interactive and fun way to learn C++, one of the most popular high-level programming languages for graphic applications This unique, hands-on approach to learning C++ makes t......一起来看看 《You Can Program in C++》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

MD5 加密
MD5 加密

MD5 加密工具