Skip to content

Instantly share code, notes, and snippets.

@coryhouse
coryhouse / authorApi.js
Created August 6, 2015 13:04
Mock Author API for "Building Applications with React and Flux" on Pluralsight
"use strict";
//This file is mocking a web API by hitting hard coded data.
var authors = require('./authorData').authors;
var _ = require('lodash');
//This would be performed on the server in a real app. Just stubbing in.
var _generateId = function(author) {
return author.firstName.toLowerCase() + '-' + author.lastName.toLowerCase();
};