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 get from 'lodash.get' | |
import isEqual from 'lodash.isequal' | |
import v from 'voca' | |
export const titleCase = s => v.titleCase(s, ["'", /[A-Z]/]) | |
export const isArray = val => Array.isArray(val) | |
// returns collection that is unique on the provided key | |
// eg: uniqueOn([{ id: 1, name: "stefan"}, { id: 1, name: "john" }], "id") => [{ id: 1, name "stefan"}] |
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, useEffect, useRef } from 'react' | |
import get from 'lodash.get' | |
import { array, bool, func } from 'prop-types' | |
import Autocomplete from '@material-ui/lab/Autocomplete' | |
import Button from '@material-ui/core/Button' | |
import FormGroup from '@material-ui/core/FormGroup' | |
import FormLabel from '@material-ui/core/FormLabel' | |
import FormHelperText from '@material-ui/core/FormHelperText' | |
import TextField from '@material-ui/core/TextField' | |
import { contains, compareUsingKey, isEmpty } from 'utils' |
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, { Component } from 'react' | |
import { Switch, Route } from 'react-router-dom' | |
import PrivateRoute from 'components/PrivateRoute' | |
import Login from 'components/Login' | |
class App extends Component { | |
state = {} |
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 PropTypes from 'prop-types' | |
class CompX extends Component { | |
const { estimatedHours } = this.props | |
handleClick = (e) => { | |
e.preventDefault() | |
if (this.actualHours.value === estimatedHours) { | |
console.log('estimated hours matches actual hours :)') | |
} |
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
// API that allows user to perform decryption actions on a given text | |
import _ from 'lodash' | |
import plain from './plain.txt' | |
export default class CipherDecrypter { | |
constructor(encrypted = "") { | |
this.base = plain.toUpperCase() | |
this.encrypted = encrypted | |
this.quadgramStats = this.getQuadgramStats() | |
} |