(function() {
  angular.module('notely.login')
    .service('CurrentUser', CurrentUser);

  CurrentUser['$inject'] = ['$window']
  function CurrentUser($window) {
    var currentUser = JSON.parse($window.localStorage.getItem('currentUser'));

    this.set = function(user) {
      currentUser = user;
      $window.localStorage.setItem('currentUser', JSON.stringify(currentUser));
    }

    this.get = function() {
      return currentUser || {};
    }

    this.clear = function() {
      currentUser = undefined;
      $window.localStorage.removeItem('currentUser');
    }
  }
})();

@@ -1,20 +1,4 @@
-(function() %7B%0A  
 angu
@@ -24,18 +24,16 @@
 login')%0A
-  
   .servi
@@ -54,100 +54,82 @@
 r', 
-CurrentUser);%0A%0A  CurrentUser
 %5B'$
+w
 in
-ject'%5D = %5B'$window'%5D%0A  function CurrentUser($window
+dow', ($window) =%3E %7B%0A%0A  class CurrentUser %7B%0A    constructor(
 ) %7B%0A    
 var 
@@ -128,12 +128,15 @@
     
-var 
+  this.
 curr
@@ -206,32 +206,22 @@
 ));%0A
-%0A    this.set = function
+    %7D%0A%0A    set
 (use
@@ -223,32 +223,37 @@
 t(user) %7B%0A      
+this.
 currentUser = us
@@ -321,16 +321,21 @@
 ringify(
+this.
 currentU
@@ -356,27 +356,11 @@
     
-this.get = function
+get
 () %7B
@@ -373,16 +373,21 @@
  return 
+this.
 currentU
@@ -412,29 +412,13 @@
     
-this.clear = function
+clear
 () %7B
@@ -424,16 +424,21 @@
 %7B%0A      
+this.
 currentU
@@ -522,10 +522,38 @@
   %7D%0A
-%7D)(
+  return new CurrentUser();%0A%0A%7D%5D
 );%0A

Make CurrentUser service use class syntax with inherited dependencies.