Skip to content

Instantly share code, notes, and snippets.

View llambeau's full-sized avatar

Louis Lambeau llambeau

  • Enspirit SRL / Quadrabee SLU
  • Barcelona, ES
  • X @hearlamb
View GitHub Profile
const factorEndpoint = (baseUrl) => {
const endpoint = (id) => {
return createApi(`${baseUrl}/${id}`);
}
Object.assign(endpoint, {
get(id){
const url = id ? `${baseUrl}/${id}` : baseUrl;
console.log('GET on', url);
},
delete(){},

Keybase proof

I hereby claim:

  • I am llambeau on github.
  • I am louislambeau (https://keybase.io/louislambeau) on keybase.
  • I have a public key ASBpiQKYnrkUVf8Ze-7v9z1_TaZ3Fd3SvBZBo-OqFPATuQo

To claim this, I am signing this object:

var Finitio = require('finitio.js');
var TypeFactory = require('finitio.js/lib/support/factory');
var _ = require('underscore');
var $ = function(name, obj){
var source = obj.toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1];
var result = Finitio.parse(source);
return result;
};