<commit_before>'use strict';

var React = require('react-native');

var { NativeModules, RCTDeviceEventEmitter } = React;

module.exports = {
  rotate: function (rotation) {
    NativeModules.OrientationController.rotate(rotation);
  },
  getDeviceOrientation: function(callback) {
    NativeModules.OrientationController.getDeviceOrientation(callback);
  },
  getApplicationOrientation: function(callback) {
    NativeModules.OrientationController.getApplicationOrientation(callback);
  },
  addApplicationListener: function(callback) {
    return RCTDeviceEventEmitter.addListener(
      'applicationOrientationDidChange', callback
    );
  },
  removeApplicationListener: function(listener) {
    RCTDeviceEventEmitter.removeListener(
      'applicationOrientationDidChange', listener
    );
   },
  addDeviceListener: function(callback) {
    return RCTDeviceEventEmitter.addListener(
      'deviceOrientationDidChange', callback
    );
  },
  removeDeviceListener: function(listener) {
    RCTDeviceEventEmitter.removeListener(
      'deviceOrientationDidChange', listener
    );
  }
}
<commit_msg>Rotation 1,2,3 eq 90,180,270<commit_after>'use strict';

var React = require('react-native');

var { NativeModules, RCTDeviceEventEmitter } = React;

var getRotation = function (rotation) {
  if(rotation == 1) {
    rotation = 90;
  } else if (rotation == 2) {
    rotation = 180;
  } else if(rotation == 3) {
    rotation = 270;
  }
  return rotation;
};


module.exports = {
  rotate: function (rotation) {
    NativeModules.OrientationController.rotate(getRotation(rotation));
  },
  getDeviceOrientation: function(callback) {
    NativeModules.OrientationController.getDeviceOrientation(callback);
  },
  getApplicationOrientation: function(callback) {
    NativeModules.OrientationController.getApplicationOrientation(callback);
  },
  addApplicationListener: function(callback) {
    return RCTDeviceEventEmitter.addListener(
      'applicationOrientationDidChange', callback
    );
  },
  removeApplicationListener: function(listener) {
    RCTDeviceEventEmitter.removeListener(
      'applicationOrientationDidChange', listener
    );
   },
  addDeviceListener: function(callback) {
    return RCTDeviceEventEmitter.addListener(
      'deviceOrientationDidChange', callback
    );
  },
  removeDeviceListener: function(listener) {
    RCTDeviceEventEmitter.removeListener(
      'deviceOrientationDidChange', listener
    );
  }
}

{'fraction_non_alphanumeric': 0.10196560196560196, 'fraction_numerical': 0.009009009009009009, 'mean_word_length': 4.789099526066351, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1575054', 'n_tokens_mistral': 684, 'n_tokens_neox': 656, 'n_words': 108}