<commit_before>// @flow

import deviceInfo from 'react-native-device-info'
import networkInfo from 'react-native-network-info'
import pkg from '../../../package.json'

export const getIpAddress = (): Promise<?string> =>
	new Promise(resolve => {
		try {
			networkInfo.getIPAddress(resolve)
		} catch (err) {
			resolve(null)
		}
	})

export const getPosition = (): Promise<Object> =>
	new Promise((resolve, reject) => {
		navigator.geolocation.getCurrentPosition(resolve, err => reject(err))
	})

export const collectData = async () => ({
	id: deviceInfo.getUniqueID(),<commit_msg>Simply pass reject instead of using an arrow function to call it<commit_after>// @flow

import deviceInfo from 'react-native-device-info'
import networkInfo from 'react-native-network-info'
import pkg from '../../../package.json'

export const getIpAddress = (): Promise<?string> =>
	new Promise(resolve => {
		try {
			networkInfo.getIPAddress(resolve)
		} catch (err) {
			resolve(null)
		}
	})

export const getPosition = (): Promise<Object> =>
	new Promise((resolve, reject) => {
		navigator.geolocation.getCurrentPosition(resolve, reject)
	})

export const collectData = async () => ({
	id: deviceInfo.getUniqueID(),
{'fraction_non_alphanumeric': 0.14962593516209477, 'fraction_numerical': 0.0, 'mean_word_length': 4.423423423423423, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 18, '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': '4646107', 'n_tokens_mistral': 383, 'n_tokens_neox': 368, 'n_words': 91}