本文整理汇总了TypeScript中lodash/isEmpty.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: processResponse
processResponse(response) {
this.loading = false
let results = response.data.results
if (results) {
this.cachedGeolocation = results[0].geometry
if (!isEmpty(this.cachedGeolocation)) {
this.searchkit._search()
}
} else {
this.cachedGeolocation = {}
}
}
开发者ID:teisman,项目名称:searchkit,代码行数:12,代码来源:LocationAccessor.ts
示例2: buildSharedQuery
buildSharedQuery(query) {
let q = (this.state.getValue() || "") + ""
if (q && !this.loading) {
let radius = this.searchkit.getAccessorByType(RadiusAccessor).getRadius()
let geolocation = this.getCachedGeolocation(q)
if (!isEmpty(geolocation)) {
let geoFilter = GeoQuery(this.options.queryField, {
lat: geolocation.lat,
lon: geolocation.lng,
distance: radius
})
let selectedFilter = {
name: this.options.title,
value: q,
id: this.key,
remove: () => this.state = this.state.clear()
}
return query.addFilter(this.key, geoFilter).addSelectedFilter(selectedFilter)
} else {
this.getCachedGeolocation(q)
}
}
return query
}
开发者ID:teisman,项目名称:searchkit,代码行数:24,代码来源:LocationAccessor.ts
示例3: canActivate
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
// this will be passed from the route config
// on the data property
const expectedRole = route.data.expectedRole;
const token = localStorage.getItem('token');
// decode the token to get its payload
const tokenPayload = decode(token);
if (this.auth.isAuthenticated()) {
if (!isEmpty(route.data)) {
if (tokenPayload.sub.role !== expectedRole) {
this.router.navigate(['/workschedule']);
} else {
return true;
}
} else {
return true;
}
} else {
// not logged in so redirect to login page with the return url
this.router.navigate(['/login'], { queryParams: { returnUrl: state.url }});
}
}
开发者ID:mdenuil,项目名称:2.2-frontend,代码行数:24,代码来源:auth.guard.ts
示例4: filter
val = filter(val, f => !isEmpty(f))
开发者ID:BenJamesbabala,项目名称:searchkit,代码行数:1,代码来源:BoolQueries.ts
示例5: invariant
const checkKey = (key) => invariant(
isString(key) && !isEmpty(key),
'(app/utils...) injectSaga: Expected `key` to be a non empty string'
);
开发者ID:,项目名称:,代码行数:4,代码来源:
示例6: getUniqueStoreKey
export function getUniqueStoreKey(type, query) {
return _isEmpty(query)
? type
: type + JSON.stringify(query);
}
开发者ID:pinkasey,项目名称:activegan,代码行数:5,代码来源:list.ts
示例7: hasValue
hasValue(){
return !isEmpty(this.value)
}
开发者ID:Baltox,项目名称:searchkit,代码行数:3,代码来源:ObjectState.ts
注:本文中的lodash/isEmpty.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论