From f1b953a263e0b77d8364ca7ebc6313b39b0ca669 Mon Sep 17 00:00:00 2001 From: Randy Morris Date: Tue, 18 Mar 2014 21:49:10 -0400 Subject: [PATCH] Fix custom `TodoList` implementation API --- docs/getting-started.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 69e1f8a9..8b4b8938 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -474,15 +474,15 @@ In order to deal with that type of refactoring, one can explicitly decide to sup Given the code above, the replacement class would only need to implement the `.push()` and `.map()` methods. By freezing APIs and swapping implementations, the developer can completely avoid touching other layers in the application while refactoring. ```javascript -todo.Todo = Array; +todo.TodoList = Array; ``` becomes: ```javascript -todo.Todo = { - push: function() { /*...*/ }, - map: function() { /*...*/ } +todo.TodoList = function () { + this.push = function() { /*...*/ }, + this.map = function() { /*...*/ } }; ```