How to use the validateTopicName function from bindings

Find comprehensive JavaScript bindings.validateTopicName code examples handpicked from public code repositorys.

68
69
70
71
72
73
74
75
76
77
validateTopicName(topic) {
  if (typeof topic !== 'string') {
    throw new TypeError('Invalid argument');
  }

  let result = rclnodejs.validateTopicName(topic);
  if (result === null) {
    return true;
  }
  throw this._createErrorFromValidation(result);
fork icon65
star icon254
watch icon27

1034
1035
1036
1037
1038
1039
1040
1041
1042
  let expandedTopic = rclnodejs.expandTopicName(
    topic,
    this.name(),
    this.namespace()
  );
  rclnodejs.validateTopicName(expandedTopic);

  return rclnodejs.countPublishers(this.handle, expandedTopic);
}
fork icon65
star icon244
watch icon27

+ 107 other calls in file

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)