Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLEANUP beta] Remove deprecated Map#remove #11809

Merged
merged 1 commit into from Jul 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions packages/ember-metal/lib/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,6 @@ OrderedSet.prototype = {
return this;
},

/**
@deprecated

@method remove
@param obj
@param _guid (optional and for internal use only)
@return {Boolean}
@private
*/
remove(obj, _guid) {
Ember.deprecate('Calling `OrderedSet.prototype.remove` has been deprecated, please use `OrderedSet.prototype.delete` instead.', this._silenceRemoveDeprecation);

return this.delete(obj, _guid);
},

/**
@since 1.8.0
@method delete
Expand Down Expand Up @@ -341,21 +326,6 @@ Map.prototype = {
return this;
},

/**
@deprecated see delete
Removes a value from the map for an associated key.

@method remove
@param {*} key
@return {Boolean} true if an item was removed, false otherwise
@private
*/
remove(key) {
Ember.deprecate('Calling `Map.prototype.remove` has been deprecated, please use `Map.prototype.delete` instead.');

return this.delete(key);
},

/**
Removes a value from the map for an associated key.

Expand Down
17 changes: 0 additions & 17 deletions packages/ember-metal/tests/map_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,6 @@ function testMap(nameAndFunc) {
equal(map.forEach.length, 1, 'expected arity for map.forEach is 1');
});

QUnit.test('remove', function() {
map.set(object, 'winning');
map.set(number, 'winning');
map.set(string, 'winning');

expectDeprecation(function() {
map.remove(object);
map.remove(number);
map.remove(string);

// doesn't explode
map.remove({});
}, 'Calling `Map.prototype.remove` has been deprecated, please use `Map.prototype.delete` instead.');

mapHasEntries([]);
});

QUnit.test('has empty collection', function() {
equal(map.has('foo'), false);
equal(map.has(), false);
Expand Down