Skip to content

Instantly share code, notes, and snippets.

View VitorLuizC's full-sized avatar

Vitor L Cavalcanti VitorLuizC

View GitHub Profile
type Dictionary = {
[name: string]: string;
};
type Getter = {
get: () => any;
set: (value: any) => void;
};
type Getters <T extends Dictionary> = {
// Fit text into an element, auto resize it's font-size.
const DesignerFear = () => {
};
export default DesignerFear;
@VitorLuizC
VitorLuizC / collection.js
Last active July 16, 2018 21:02
Collection library
import * as object from './object'
export const toObject = (collection) =>
[ ...collection ].reduce(object.increase, {})
const employees = [
{
name: 'Renan',
salary: 1000.00
},
{
name: 'Vitor',
salary: 980.50
},
{
{
  profile: {
    soma: 20,
    menor: 1
  }
}

After getProperties

@VitorLuizC
VitorLuizC / without.js
Last active December 10, 2018 22:39
"without" module exports a function. It returns a new object without specified properties.
/**
* Returns new object without specified properties.
* @param {Array.<string>} keys
* @param {Object.<string, *>} object
* @returns {Object.<string, *>}
*/
const without = (
[ key, ...keys ] = [],
{ [key]: _, ...object } = {}
) => keys.length ? object : without(keys, object);
@VitorLuizC
VitorLuizC / user.hs
Last active January 23, 2018 15:35
Haskell - Tudo que aprendi lendo o código dos outros e pesquisando depois.
module User (
User
) where
data User = User {
name :: String,
id :: String
}
@VitorLuizC
VitorLuizC / README.md
Last active September 6, 2018 15:03 — forked from jperasmus/compose.js
Compose function that handles both sync and async functions.
@VitorLuizC
VitorLuizC / constants.js
Last active March 27, 2018 18:45
Time module.
/**
* Second in milliseconds.
*/
const SECOND = 1000
/**
* Minute in milliseconds.
*/
const MINUTE = 60 * SECOND
<template>
<nav class="c-navigation">
<component
v-for="(link, index) in links"
exact
active-class="-active"
exact-active-class="-active"
:is="link.route ? 'router-link' : 'a'"
:to="link.route"
:key="index"