@4geit/swg-create-or-load-data-helper 中文文档教程
@4geit/swg-create-or-load-data-helper
使用数据伪造生成器创建或加载数据文件的辅助函数
Installation
- A recommended way to install @4geit/swg-create-or-load-data-helper is through npm package manager using the following command:
npm i @4geit/swg-create-or-load-data-helper --save
或使用 yarn
使用以下命令:
yarn add @4geit/swg-create-or-load-data-helper
- All you have to do is to import the
@4geit/swg-create-or-load-data-helper
package in your controller or mock file as below:
// ...
const swgCreateOrLoadDataHelper = require('@4geit/swg-create-or-load-data-helper');
// ...
并将其与您的端点控制器之一一起使用,如下所示:
// ...
const data = swgCreateOrLoadDataHelper(filename, library, generator, n)
// ...
@4geit/swg-create-or-load-data-helper
helper function to create or load a data file with a data fake generator
Installation
- A recommended way to install @4geit/swg-create-or-load-data-helper is through npm package manager using the following command:
npm i @4geit/swg-create-or-load-data-helper --save
Or use yarn
using the following command:
yarn add @4geit/swg-create-or-load-data-helper
- All you have to do is to import the
@4geit/swg-create-or-load-data-helper
package in your controller or mock file as below:
// ...
const swgCreateOrLoadDataHelper = require('@4geit/swg-create-or-load-data-helper');
// ...
And use it with one of your endpoint controller as below:
// ...
const data = swgCreateOrLoadDataHelper(filename, library, generator, n)
// ...