本文整理汇总了TypeScript中com.unarin.cordova.beacon.underscorejs.default.isString方法的典型用法代码示例。如果您正苦于以下问题:TypeScript unarin.cordova.beacon.underscorejs.default.isString方法的具体用法?TypeScript unarin.cordova.beacon.underscorejs.default.isString怎么用?TypeScript unarin.cordova.beacon.underscorejs.default.isString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.unarin.cordova.beacon.underscorejs.default
的用法示例。
在下文中一共展示了unarin.cordova.beacon.underscorejs.default.isString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
Regions.fromJson = function(jsonMap) {
var typeName = jsonMap.typeName;
if (!_.isString(typeName) || _.isEmpty(typeName)) {
throw new TypeError('jsonMap need to have a key "typeName"');
}
var identifier = jsonMap.identifier;
var region = null;
if (typeName === 'CircularRegion') {
var latitude = jsonMap.latitude;
var longitude = jsonMap.longitude;
var radius = jsonMap.radius;
region = new CircularRegion(identifier, latitude, longitude, radius);
} else if (typeName === 'BeaconRegion') {
var uuid = jsonMap.uuid;
var major = jsonMap.major;
var minor = jsonMap.minor;
region = new BeaconRegion(identifier, uuid, major, minor);
} else {
console.error('Unrecognized Region typeName: ' + typeName);
}
return region;
};
示例2: function
Delegate.safeTraceLogging = function(message) {
if (!_.isString(message)) {
return;
}
try {
cordova.plugins.locationManager.appendToDeviceLog(message);
} catch (e) {
console.error('Fail in safeTraceLogging()' + e.message, e);
}
};
示例3: function
LocationManager.prototype._onDelegateCallback = function (deferred, pluginResult) {
this.appendToDeviceLog('_onDelegateCallback() ' + JSON.stringify(pluginResult));
if (pluginResult && _.isString(pluginResult['eventType'])) { // The native layer calling the DOM with a delegate event.
this._mapDelegateCallback(pluginResult);
} else if (Q.isPending(deferred.promise)) { // The callback ID registration finished, runs only once.
deferred.resolve();
} else { // The native layer calls back the delegate without specifying an event, coding error.
console.error('Delegate registration promise is already been resolved, all subsequent callbacks should provide an "eventType" field.');
}
};