Additional information or tag line
A brief description of your project, what it is used for.
A quick introduction of the minimal setup you need to get a hello world up &
import test from 'tape'; | |
// For each unit test you write, | |
// answer these questions: | |
test('What component aspect are you testing?', assert => { | |
const actual = 'What is the actual output?'; | |
const expected = 'What is the expected output?'; | |
assert.equal(actual, expected, | |
'What should the feature do?'); |
$rem-baseline: 16px !default; | |
$rem-fallback: false !default; | |
$rem-px-only: false !default; | |
@function rem-separator($list, $separator: false) { | |
@if $separator == "comma" or $separator == "space" { | |
@return append($list, null, $separator); | |
} | |
@if function-exists("list-separator") == true { |
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ | |
/* Document | |
========================================================================== */ | |
/** | |
* 1. Correct the line height in all browsers. | |
* 2. Prevent adjustments of font size after orientation changes in iOS. | |
*/ |
1)----------------------- | |
// Setup the header for the request | |
const middlewareAuthLink = new ApolloLink((operation, forward) => { | |
const token = localStorage.getItem(JWT_TOKEN) | |
const authorizationHeader = token ? `Bearer ${token}` : null | |
operation.setContext({ | |
headers: { | |
authorization: authorizationHeader, | |
}, |
### Node ### | |
# Logs | |
logs | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
# Optional npm cache directory | |
.npm |
import { useEffect, useState } from 'react' | |
//react hook for checking if clicked outside @param ref | |
// @param = funct runed if clicked outside @param ref | |
export const useOnClickOutside = (ref, handler) => { | |
useEffect( | |
() => { | |
const listener = event => { | |
// Do nothing if clicking ref's element or descendent elements | |
if (!ref.current || ref.current.contains(event.target)) { |
import { useEffect, useState } from 'react' | |
//react hook for checking if clicked outside @param ref | |
// @param = funct runed if clicked outside @param ref | |
export const useOnClickOutside = (ref, handler) => { | |
useEffect( | |
() => { | |
const listener = event => { | |
// Do nothing if clicking ref's element or descendent elements | |
if (!ref.current || ref.current.contains(event.target)) { |
/** | |
* @param {string} email - string to check | |
* @return {boolean} if string = valid email | |
*/ | |
const validateEmail = (email: string | number): boolean => { | |
if (typeof email != 'string') { | |
return false | |
} | |
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ | |
return re.test(email) |