The best module ever.
Install the module with: npm install marsrover
var marsrover = require('marsrover');
marsrover.awesome(); // "awesome"
Install with cli command
$ npm install -g marsrover
$ marsrover --help
$ marsrover --version
# creates a browser.js
$ grunt browserify
I have done this kata in javascript to play a little with the different types of inheritance you can use in javascript and the implications of each one.
I have created a map object with a classical inheritance pattern: a constructor function and new
I have created a standardStrategy as the parent object of all movingStrategies using the modern pattern of prototypical inheritance (kind of). standarStrategy is a singleton defined with and object Literal. It has no constructor function -> no access to prototype -> cannot use Object.create to create child objects -> monkey patch instead.
standardStrategy could be better with a constructor function and using Object.create(constructor.prototype)? It would need implementing the Singleton pattern so it seems overkill.