Skip to content

Commit

Permalink
Release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
uglymunky committed May 20, 2015
1 parent ac2a869 commit 33b6053
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 42 deletions.
20 changes: 1 addition & 19 deletions dist/amd/backbone.siren.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Backbone.Siren v0.3.7
* Backbone.Siren v0.4.0
*
* Copyright (c) 2015 Kiva Microfunds
* Licensed under the MIT license.
Expand All @@ -22,18 +22,6 @@ define(['jquery', 'underscore', 'backbone'], function ($, _, Backbone) {
};


/**
* Converts a hyphenated name to camelCase.
*
* @static
* @param name
* @returns {String}
*/
function toCamelCase(name) {
return name.replace(/(\-[a-z])/g, function(match){return match.toUpperCase().replace('-','');});
}


/**
* Gets a link url by name from a raw siren entity
*
Expand Down Expand Up @@ -416,12 +404,6 @@ define(['jquery', 'underscore', 'backbone'], function ($, _, Backbone) {
var bbSirenAction = new BbSiren.Action(action, self);

_actions.push(bbSirenAction);

if (action.name) {
self[toCamelCase(action.name)] = _.bind(bbSirenAction.execute, bbSirenAction);
} else {
warn('Action is missing a name, unable to add top level method', action);
}
});

self._actions = _actions;
Expand Down
Loading

0 comments on commit 33b6053

Please sign in to comment.