This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkCashRegister(price, cash, cid) { | |
let change = cash - price; | |
let total = 0; | |
let totalCID = cid.forEach((item) => { | |
total += item[1] | |
}); | |
console.log(total); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function repeatStringNumTimes(arr) { | |
if(arr.length%2 === 0) { | |
return 0; | |
} else { | |
const middle = (arr.length - 1) / 2; | |
const left = isLessMiddle(0, middle - 1, arr, arr[middle]); | |
const right = isLessMiddle(middle + 1, arr.length - 1, arr, arr[middle]); | |
console.log(right); | |
if(left && right) { | |
return 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import Moment from "moment-timezone"; | |
import _ from "lodash"; | |
import { handleAPIError } from "./handleErrors"; | |
function getDateTime(time, date, timezone) { | |
const hours = Moment(time).format("HH"); | |
const minutes = Moment(time).format("mm"); | |
if (timezone) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import Moment from "moment-timezone"; | |
import { format24as12, format12as24 } from "./functions"; | |
export const timeValidator = (time: string) => { | |
let validation; | |
const initialValidation = /^\d{1,2}([:.-]?\d{1,2})?([ ]?[A|P|a|p](M|m))?$/; | |
if (initialValidation.test(time)) { | |
let valTime = time; | |
if (/[am|pm]/i.test(valTime)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsxFrag React.Fragment */ | |
/** @jsx jsx */ | |
import React, { useEffect, useRef, useState } from "react"; | |
import { css, jsx } from "@emotion/core"; | |
import Moment from "moment-timezone"; | |
import { gql, useMutation, useQuery } from "@apollo/client"; | |
import uuidv4 from "uuid/v4"; | |
import { | |
compressToEncodedURIComponent, | |
decompressFromEncodedURIComponent, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState, useCallback } from "react"; | |
import MnassaInput from "../../../../components/MnassaInput"; | |
import { | |
getConnectionRequest, | |
clearGetConnectionResult, | |
} from "../../../../store/actions/getConnections"; | |
import { useDispatch, useSelector } from "react-redux"; | |
import { searchConnectionRequest } from "../../../../store/actions/getConnections/searchConnections"; | |
import loadingSpinner from "../../../../images/spinner-icon-gif-10.gif"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
import { ImageBackground, View, StyleSheet, TouchableOpacity } from 'react-native'; | |
import ImagePreview from './ImagePreview'; | |
import { Ionicons } from '@expo/vector-icons'; | |
import Shimmer from './Shimmer'; | |
const RemoveImage = ({ onPress }) => { | |
return ( | |
<View style={styles.removeContainer}> | |
<TouchableOpacity style={styles.remove} onPress={onPress}> | |
<Ionicons name="ios-close" size={30} color={'white'} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |
# yarn lockfile v1 | |
"@babel/code-frame@7.5.5", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": | |
version "7.5.5" | |
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" | |
integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== | |
dependencies: | |
"@babel/highlight" "^7.0.0" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["env"], | |
"plugins": [ | |
"transform-class-properties", | |
"transform-object-rest-spread", | |
[ | |
"transform-runtime", | |
{ | |
"polyfill": false, | |
"regenerator": true |
NewerOlder