Skip to content

Commit

Permalink
remove getIdentity
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherjbaker committed Oct 16, 2017
1 parent 2b60c1c commit c1945a9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
6 changes: 1 addition & 5 deletions can-observation.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,8 @@ canReflect.assignSymbols(Observation.prototype,{
this.options.priority = priority;
},
//!steal-remove-start
"can.getIdentity": function() {
return canReflect.getName(this.func);
},
"can.getName": function() {
var identity = canReflect.getIdentity(this) || "";
return canReflect.getName(this.constructor) + "<" + identity + ">";
return canReflect.getName(this.constructor) + "<>";
},
//!steal-remove-end
});
Expand Down
12 changes: 0 additions & 12 deletions can-observation_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var eventQueue = require("can-event-queue");
var clone = require("steal-clone");
var canReflect = require("can-reflect");
var canSymbol = require("can-symbol");
var canTestHelpers = require("can-test-helpers");

QUnit.module('can-observation',{
setup: function(){}
Expand Down Expand Up @@ -530,14 +529,3 @@ QUnit.test("get and set priority", function(){

QUnit.equal(canReflect.getPriority(observation), 3);
});

canTestHelpers.devOnlyTest("can.getName and can.getIdentity symbol behavior", function(assert) {
var obs = new Observation(function(){});
obs[canSymbol.for("can.getIdentity")] = function() {
return 0;
};

var name = obs[canSymbol.for("can.getName")]();

assert.equal(name, "Observation<0>", "includes constructor name and identity");
});
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"can-namespace": "1.0.0",
"can-observation-recorder": "<2.0.0",
"can-queues": "<2.0.0",
"can-reflect": "^1.6.0",
"can-reflect": "^1.7.0",
"can-symbol": "^1.0.0",
"can-util": "^3.9.0"
},
Expand All @@ -49,7 +49,6 @@
"can-compute": "^3.3.1",
"can-define": "^1.3.2",
"can-map": "^3.3.1",
"can-test-helpers": "^1.0.1",
"done-serve": "^1.2.0",
"donejs-cli": "^1.0.1",
"generator-donejs": "^1.0.5",
Expand Down

0 comments on commit c1945a9

Please sign in to comment.