Skip to content

Instantly share code, notes, and snippets.

View pedroassis's full-sized avatar

Pedro Henrique de Assis pedroassis

View GitHub Profile
@pedroassis
pedroassis / gist:2626af64b4b8d36ce438
Created September 2, 2014 13:04
One line public method, well not one line after breaking it
this.getAll = () => ClassLoader
.getAll(ENTITYS_PATH)
.sort((a, b) => a.length < b.length)
.map((model) => SchemaBuilder.build(model));
@pedroassis
pedroassis / is.js
Last active August 29, 2015 14:04
Functional way for a if statement
// Just to be sure ;)
if (!Boolean.prototype.is)
{
Boolean.prototype.is = function(fun /*, thisArg */)
{
'use strict';
if (this === void 0 || this === null){
throw new TypeError();
}