Skip to content

Instantly share code, notes, and snippets.

View cprass's full-sized avatar
🌱

Chris cprass

🌱
View GitHub Profile
var currencyValidator = {
format: function (number) {
return (Math.trunc(number * 100) / 100).toFixed(2)
},
parse: function (newString, oldNumber) {
var CleanParse = function (value) {
return { value: value }
}
var CurrencyWarning = function (warning, value) {
return {
const person = {
firstName: 'Douglas',
lastName: 'Adams'
};
function outputName(user) {
return `${user.firstName} ${user.lastName}`;
}
const App = (
npm init
npm install --save react react-dom
npm install -g create-react-app
create-react-app hello-world
cd hello-world
npm start
<script src="https://unpkg.com/react@15/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>
@cprass
cprass / Fade.vue
Created October 9, 2016 09:53
Vue component for simple fade-out-in with Velocity.js
<template>
<transition
name="fade"
mode="out-in"
v-on:before-enter="beforeEnter"
v-on:enter="enter"
v-on:before-leave="beforeLeave"
v-on:leave="leave"
>
<slot></slot>