• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript lodash.merge函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setAccountsData

function setAccountsData(state: any, action : IAccountsResponse) : any {
    return _.merge({}, state, { data: action.response.data })
}
开发者ID:Emunoz88,项目名称:node-hapi-react-redux-sass-typescript-mongo-webpack-hmr-gulp,代码行数:3,代码来源:accounts.ts


示例2:

 return editedFile.apply().then(() => {
   options.dasherizedName = 'trap-queen';
   options.component = 'TrapQueenComponent';
   return nru.applyChanges(
     nru.addPathToRoutes(routesFile, _.merge({route: 'home/trap-queen'}, options)));
 })
开发者ID:StudioProcess,项目名称:angular-cli,代码行数:6,代码来源:route-utils.spec.ts


示例3: expect

 expect(() => nru.addPathToRoutes(routesFile, _.merge({route: 'about/details'}, options)))
开发者ID:StudioProcess,项目名称:angular-cli,代码行数:1,代码来源:route-utils.spec.ts


示例4:

 PerusteProjektiService.mergeProjekti($scope.projekti, tuoPohja).then(function(peruste, projekti) {
     _.merge($scope.projekti, projekti);
     $scope.peruste = peruste;
 });
开发者ID:Opetushallitus,项目名称:eperusteet,代码行数:4,代码来源:excel.ts


示例5: get

export const construct = (config: ServerConfig): {
  rootAppConfig: RootAppConfig,
  cmsConfig: CmsServerConfig,
  graphqlConfig: GqlifyConfig,
  authConfig: AuthConfig,
} => {
  // merge common config with default config
  const authMountPath = defaultConfig.authMountPath;
  const hostname = get(config, 'common.hostname');

  // cookieKeys will override auth & cms cookie config
  const cookieKeys = defaultTo(get(config, 'common.cookieKeys'), defaultConfig.cookieKeys);

  // Whether this cms is public access or not
  const publicAuth = defaultTo(get(config, 'common.public'), defaultConfig.public);

  // oidc clientId & clientSecret are shared between cms & auth services
  const clientId = defaultTo(get(config, 'common.clientId'), defaultConfig.clientId);
  const clientSecret = defaultTo(get(config, 'common.clientSecret'), defaultConfig.clientSecret);

  // oidc issuer
  const discoveryUrlFromHost = `${hostname}${authMountPath}/.well-known/openid-configuration`;
  const discoveryUrl = defaultTo(get(config, 'common.discoveryUrl'), discoveryUrlFromHost);
  const issuerConfig = get(config, 'common.issuerConfig');

  // graphql endpoint
  const graphqlEndpoint = `${hostname}/graphql`;

  // construct config for cms service
  const cmsConfig: CmsServerConfig = merge({
    cookieKeys,
    hostname,
    oidc: {
      discoveryUrl,
      clientId,
      clientSecret,
    },
    logger: jsonLogger,
  }, config.cms);

  // config for gqlify service
  const graphqlConfig: GqlifyConfig = {
    logger: jsonLogger,
    oidc: {
      discoveryUrl,
      issuerConfig,
    },
    ...config.graphql,
  };

  // config for auth service
  let authConfig: AuthConfig = {
    mountPath: defaultConfig.authMountPath,
    issuer: hostname,
    cookies: {
      long: { signed: true, maxAge: (1 * 24 * 60 * 60) * 1000 }, // 1 day in ms
      short: { signed: true },
      keys: cookieKeys,
    },
    redirectUris: [`${hostname}/auth/callback`],
    postLogoutRedirectUris: [`${hostname}/`],
    clientId,
    clientSecret,
    logger: jsonLogger,
    ...config.auth,
  };

  const rootAppConfig = {
    graphqlEndpoint,
    cookieKeys,
  };

  // if publicAuth is true, we make this cms public
  // mark cmsConfig.oidc as null to tell cmsServer we do not need oidc
  // mark graphqlConfig.oidc as null to tell graphql server we do not need auth
  // mark authConfig to null, so auth service won't start
  if (publicAuth) {
    cmsConfig.oidc = null;
    graphqlConfig.oidc = null;
    authConfig = null;
  }

  return {
    rootAppConfig,
    cmsConfig,
    graphqlConfig,
    authConfig,
  };
};
开发者ID:Canner,项目名称:canner,代码行数:89,代码来源:factory.ts


示例6: fusePerfectScrollbarOptions

    // -----------------------------------------------------------------------------------------------------
    // @ Accessors
    // -----------------------------------------------------------------------------------------------------

    /**
     * Perfect Scrollbar options
     *
     * @param value
     */
    @Input()
    set fusePerfectScrollbarOptions(value)
    {
        // Merge the options
        this._options = _.merge({}, this._options, value);
    }
开发者ID:,项目名称:,代码行数:15,代码来源:


示例7:

export function replace<T>(o: T): T {
    return _.merge(o, {__replace: true});
}
开发者ID:pzahoran,项目名称:reactive-angular2,代码行数:3,代码来源:merge.ts


示例8:

export const setup = (changes) => {
    _.merge(config, changes);
};
开发者ID:thoughtspile,项目名称:Grafar,代码行数:3,代码来源:grafar.ts


示例9: setCanHearVideoSound

   state.checkList[index].isPassed = payload.canWorkSoundMeter
 },
 setCanHearVideoSound (state, payload): void {
   state.checkList[
     Constants.ENV_CHECK_LIST_ID.CAN_HEAR_VIDEO_SOUND - 1
   ].isPassed =
     payload.canHearVideoSound
 },
 setIsChecking (state, payload): void {
   state.checkList[payload.index].isChecking = payload.isChecking
 },
 setIsLoading (state, payload): void {
   state.checkList[payload.index].isLoading = payload.isLoading
 },
 setElements (state, payload): void {
   state.elements = _.merge(state.elements, payload.elements)
 },
 setMicInputVolumeInterval (state, payload): void {
   state.micInputVolumeInterval = payload.micInputVolumeInterval
 },
 clearMicInputVolumeInterval (state): void {
   if (state.micInputVolumeInterval) {
     clearInterval(state.micInputVolumeInterval)
   }
 },
 setCurrentCheckId (state, payload): void {
   state.currentCheckId = payload.currentCheckId
 },
 setDevicePermissions (state, payload): void {
   state.devicePermissions.webcam = payload.devicePermissions.webcam
   state.devicePermissions.mic = payload.devicePermissions.mic
开发者ID:tic40,项目名称:archives,代码行数:31,代码来源:preparation.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript lodash.mergeWith函数代码示例发布时间:2022-05-25
下一篇:
TypeScript lodash.memoize函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap