当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ember-cli-mirage.faker.lorem类代码示例

本文整理汇总了TypeScript中ember-cli-mirage.faker.lorem的典型用法代码示例。如果您正苦于以下问题:TypeScript faker.lorem类的具体用法?TypeScript faker.lorem怎么用?TypeScript faker.lorem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了faker.lorem类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

 properties: () => ({
   DB_ID: faker.random.number({ min: 10000, max: 20000 }),
   TBL_ID: faker.random.number({ min: 10000, max: 20000 }),
   view_depends_on: [faker.commerce.productName()],
   create_time: faker.date.past(),
   etl_source: 'COLUMN_V2',
   input_format: faker.commerce.productName(),
   output_format: faker.commerce.productName(),
   is_compressed: false,
   SD_ID: faker.random.number({ min: 10000, max: 20000 }),
   is_storedassubdirectories: false,
   serialization_format: 'Sequence',
   tbl_type: 'VIRTUAL_VIEW',
   view_expanded_text: faker.lorem.sentence()
 }),
开发者ID:alyiwang,项目名称:WhereHows,代码行数:15,代码来源:dataset.ts

示例2: purgeNote

import { Factory, faker } from 'ember-cli-mirage';
import { PurgePolicy } from 'wherehows-web/constants';
import { hdfsUrn, nonHdfsUrn } from 'wherehows-web/mirage/fixtures/urn';

export default Factory.extend({
  datasetId: null,

  datasetUrn: faker.list.random(hdfsUrn, nonHdfsUrn),

  purgeType: faker.list.random(...Object.values(PurgePolicy)),

  purgeNote() {
    const { purgeType } = this;
    return purgeType === PurgePolicy.PurgeExempt ? faker.lorem.words(5) : '';
  },

  modifiedBy: faker.internet.userName(),

  modifiedTime: faker.date.past()
});
开发者ID:alyiwang,项目名称:WhereHows,代码行数:20,代码来源:retention.ts

示例3: id

const tierOptions = ['CRITICAL', 'WARNING', 'MINOR'];

export default Factory.extend({
  id(id: number) {
    return id;
  },
  score: faker.random.number({ min: 0, max: 100 }),
  validations() {
    const numValidations = faker.random.number({ min: 1, max: 6 });
    const validations: Array<IHealthScoreObject> = [];

    for (let i = 0; i < numValidations; i++) {
      const validation: IHealthScoreObject = {
        tier: tierOptions[i % 3],
        score: faker.random.number({ min: 0, max: 100 }) / 100,
        description: faker.lorem.sentences(),
        weight: faker.random.number({ min: 0, max: 100 }) / 100,
        validator: 'fake'
      };

      validations.push(validation);
    }

    return validations;
  },

  forTesting: trait({
    score: 83,
    validations() {
      const validations: Array<IHealthScoreObject> = [];
开发者ID:alyiwang,项目名称:WhereHows,代码行数:30,代码来源:health.ts

示例4: dasherize

 source: [...Array(10)].map(() => dasherize(faker.lorem.words().toLowerCase()))
开发者ID:alyiwang,项目名称:WhereHows,代码行数:1,代码来源:autocomplete-datasets.ts

示例5:

import { Factory, faker } from 'ember-cli-mirage';
import { DatasetPlatform, PurgePolicy } from 'wherehows-web/constants';

export default Factory.extend({
  name: faker.list.random(...Object.values(DatasetPlatform)),

  type: faker.lorem.words(1),

  supportedPurgePolicies: Object.values(PurgePolicy)
});
开发者ID:alyiwang,项目名称:WhereHows,代码行数:10,代码来源:platform.ts

示例6: uri

import { Factory, faker } from 'ember-cli-mirage';
import { DatasetPlatform } from 'wherehows-web/constants';
import { hdfsUrn, nonHdfsUrn } from 'wherehows-web/mirage/fixtures/urn';

export default Factory.extend({
  createdTime: faker.date.past(2),
  deprecated: true,
  deprecationNote: faker.lorem.words(5),
  description: faker.lorem.words(7),
  fabric: null,
  modifiedTime: faker.date.recent(),
  nativeName: 'abook.default-public-container',
  nativeType: null,
  platform: faker.list.random(...Object.values(DatasetPlatform)),
  properties: '{}',
  removed: faker.random.boolean(),
  tags: null,
  uri() {
    const { platform } = this;
    return platform === DatasetPlatform.HDFS
      ? hdfsUrn
      : nonHdfsUrn.replace(/li:dataPlatform:db/, `li:dataPlatform:${platform}`);
  }
});
开发者ID:alyiwang,项目名称:WhereHows,代码行数:24,代码来源:dataset-view.ts


注:本文中的ember-cli-mirage.faker.lorem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。