INNER CODE UNIT · JavaScript

isBoolean

nitaliano/react-native-mapbox-gl · javascript/utils/index.js:45

export function isBoolean(bool) {
  return typeof bool === 'boolean';
}

export function isPrimitive(value) {
  return isString(value) || isNumber(value) || isBoolean(value);
}

export function runNativeCommand(module, name, nativeRef, args = []) {
  const handle = findNodeHandle(nativeRef);
  if (!handle) {
    throw new Error(`Could not find handle for native ref ${module}.${name}`);
  }

  const managerInstance = isAndroid()
    ? getAndroidManagerInstance(module)
    : getIosManagerInstance(module);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…