I hereby claim:
- I am clucasalcantara on github.
- I am clucasalcantara (https://keybase.io/clucasalcantara) on keybase.
- I have a public key whose fingerprint is 32C8 0014 F11E 7D87 FE96 69D0 6108 43C9 B8D6 2FCF
To claim this, I am signing this object:
| /** | |
| * Calculates what position the carousel | |
| * should be after receive a instructions set | |
| */ | |
| const evaluateCarouselPosition = ( | |
| instructions = ">>><>", | |
| currentPosition = 0, | |
| length = 7 | |
| ) => { | |
| // Vamo lá, vou fazer com reduce first |
I hereby claim:
To claim this, I am signing this object:
| const actionTypes { | |
| SHOW_ALL: 'CART/SHOW_ALL', | |
| ADD_PRODUCT: 'CART/ADD_PRODUCT', | |
| REMOVE_PRODUCT: 'CART/REMOVE_PRODUCT', | |
| } | |
| const cart = (state, action) => { | |
| switch (action) { | |
| case actionTypes.SHOW_ALL: | |
| return state |
| /** | |
| * Product Example | |
| * | |
| * const product = { | |
| * id: 'adsa-1234ds-123s', | |
| * name: 'Batman Mask', | |
| * price: 8.97, | |
| * } | |
| */ |
| const initialState = { | |
| total: 0, | |
| itemCount: 0, | |
| products: [] | |
| }; |
| const myFunctionToBeExported = () => { | |
| alert('Hello Sir!') | |
| } | |
| export { | |
| greet: myFunctionToBeExported, | |
| myFunctionToBeExported, | |
| } | |
| // Importing |
| module.exports = { | |
| lets: () => {}, | |
| make: () => {}, | |
| some: () => {}, | |
| magic: () => {} | |
| } | |
| // output | |
| const x = require('./your_module') | |
| console.log(x) |
| // single | |
| export default a; | |
| // object | |
| export default { | |
| count () { | |
| return 'nooo'; | |
| }, | |
| increase (a) { | |
| return a + 1; |
| Object.entries(PATO).map(value => { | |
| const row = value[0].split('[') | |
| const key = row[0] | |
| const value1 = row[1].slice(0,-1) | |
| const value2 = value[1] | |
| return { | |
| [key]: { | |
| [value1]: [value2] | |
| } |
| /* | |
| * Repeatedly render a component tree using enzyme.shallow() until | |
| * finding and rendering TargetComponent. | |
| * | |
| * This is useful for testing a component wrapped in one or more | |
| * HOCs (higher order components). | |
| * | |
| * The `componentInstance` parameter is a React component instance. | |
| * Example: <MyComponent {...props} /> | |
| * |