Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Commit

Permalink
refactor(util): Remove unused variables and adjust Gruntfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mbenford committed Feb 28, 2015
1 parent 84dcd6e commit 8286673
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ module.exports = function(grunt) {
js: {
src: [
'src/constants.js',
'src/util.js',
'src/init.js',
'src/tags-input.js',
'src/auto-complete.js',
'src/transclude-append.js',
'src/autosize.js',
'src/bind-attrs.js',
'src/configuration.js'
'src/configuration.js',
'src/util.js'
],
out: 'build/<%= pkg.name %>.js',
outMin: 'build/<%= pkg.name %>.min.js'
Expand Down
4 changes: 1 addition & 3 deletions src/auto-complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
tagsInput.directive('autoComplete', function($document, $timeout, $sce, $q, tagsInputConfig, tiUtil) {
function SuggestionList(loadFn, options) {
var self = {}, debouncedLoadId, getDifference, lastPromise;
var self = {}, getDifference, lastPromise;

getDifference = function(array1, array2) {
return array1.filter(function(item) {
Expand All @@ -46,8 +46,6 @@ tagsInput.directive('autoComplete', function($document, $timeout, $sce, $q, tags
self.index = -1;
self.selected = null;
self.query = null;

$timeout.cancel(debouncedLoadId);
};
self.show = function() {
if (options.selectFirstMatch) {
Expand Down
8 changes: 8 additions & 0 deletions src/util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
'use strict';

/***
* @ngdoc factory
* @name tiUtil
* @module ngTagsInput
*
* @description
* Helper methods used internally by the directive. Should not be used directly from user code.
*/
tagsInput.factory('tiUtil', function($timeout) {
var self = {};

Expand Down

0 comments on commit 8286673

Please sign in to comment.