JSFiddle - React, Tailwind, and code Playground

by phsiao2000

HTML

<script src="https://rawgit.com/CrossEye/ramda/master/ramda.js"></script>
<script src="http://ejohn.org/files/titleCaps.js"></script>

JavaScript

var R = window.ramda;

function Person (first, last) {
    return {first: first,
            last: last,
            data: 'special',
            fullName: function(){return [first,last].join(' ');},
            full_name: [first,last].join(' ')
           }
}

var p = new Person('sam', 'jones');
var q = new Person('ronald', 'mcdonald');
var ps = [
    new Person('sam', 'smith'),
    p,
    q,
    new Person('holy', 'cow'),
    new Person('roger', 'dodger')
    ];
var get = R.curry(function(prop, obj) {return obj[prop];});
var last = get('last')(q);
//console.log(R.keys(p));
//function cc(t,b){console.log(t, b);}
var full = R.func('fullName');
var getP = R.curry(R.prop('last'));
console.log('getP', getP(p));
console.log('caps', R.curry(titleCaps)('to the breach, and to all good men'));
var f = new Function('item', 'console.log("hey", item)');
f('this!');