why?
internal vs external
do's and don'ts
Devs
Reviewer
*reviewer suggests* .... did you mean
to spend time focusing on easy to grasp, but relatively unimportant things
angular.module('myModule',[])
.controller('MyCtrl', function myCtrl($rootScope)
{
$rootScope.firstName = 'Evan'
$rootScope.lastName = 'Schultz'
$rootScope.fullName = $scope.firstName + ' ' + $scope.lastName;
$("#fullName").text($rootScope.fullName)
});
myCtrl vs MyCtrl vs MyController shouldn't be the focus here when there are bigger issues at hand
var person = {
firstName: 'Evan',
lastName: 'Schultz'
}
var makeUpperCase = R.curry(R.mapObj(function (i) {
return i.toUpperCase()
}));
makeUpperCase(person)
var person = {
firstName: 'Evan',
lastName: 'Schultz'
}
var makeUpperCase = R.curry(R.mapObj(function (i) {
return i.toUpperCase()
}));
makeUpperCase(person)
Why the hell are you currying R.mapObj?
It's totally not needed - you give Ramda a bad name, moron.
var person = {
firstName: 'Evan',
lastName: 'Schultz'
}
var makeUpperCase = R.curry(R.mapObj(function (i) {
return i.toUpperCase()
}));
makeUpperCase(person)
var person = {
firstName: 'Evan',
lastName: 'Schultz'
}
var makeUpperCase = R.curry(R.mapObj(function (i) {
return i.toUpperCase()
}));
makeUpperCase(person)
You don't need R.curry here, as most of Ramdas functions are curried by default, and it doesn't provide any value here. You could also use the R.toUpper and simplify things down to:
var makeUpperCase = R.mapObj(R.toUpper);
it('should find the given product by id', function() {
var prodId = 1;
someSvc.findById(prodId)
.then(function(result) {
expect(prodId).to.be.equal(prodId) // did they really mean result.id?
});
});
// is this test even going to hit the expect when you expect it to?
it('should convert the provided time to minutes', function() {
var input = "3 hours";
var result = someSvc.convertToSeconds(input);
expect(result).to.equal(10800)
});