can-stache-key
Advanced tools
Comparing version 1.0.2 to 1.1.0
var ObservationRecorder = require('can-observation-recorder'); | ||
var dev = require('can-log/dev/dev'); | ||
var each = require('can-util/js/each/each'); | ||
var canSymbol = require("can-symbol"); | ||
var canReflect = require("can-reflect"); | ||
var isPromiseLike = require('can-util/js/is-promise-like/is-promise-like'); | ||
var canReflectPromise = require("can-reflect-promise"); | ||
@@ -198,3 +196,3 @@ | ||
// special reflections. | ||
if(isPromiseLike(value) || typeof value === "object" && value && typeof value.then === "function") { | ||
if(canReflect.isPromise(value) || typeof value === "object" && value && typeof value.then === "function") { | ||
canReflectPromise(value); | ||
@@ -229,11 +227,10 @@ } | ||
} | ||
// TODO: remove in 3.0. This is for backwards compat with @key and @index. | ||
else if( prop.at && specialRead[prop.key] && ( ("@"+prop.key) in value)) { | ||
// TODO: remove in 5.0. | ||
//!steal-remove-start | ||
if( prop.at && specialRead[prop.key] && ( ("@"+prop.key) in value)) { | ||
options.foundAt = true; | ||
//!steal-remove-start | ||
dev.warn("Use %"+prop.key+" in place of @"+prop.key+"."); | ||
//!steal-remove-end | ||
return value["@"+prop.key]; | ||
return undefined; | ||
} | ||
//!steal-remove-end | ||
} else { | ||
@@ -331,6 +328,6 @@ return value[prop.key]; | ||
}; | ||
each(observeReader.propertyReaders, function(reader){ | ||
observeReader.propertyReaders.forEach(function(reader){ | ||
observeReader.propertyReadersMap[reader.name] = reader; | ||
}); | ||
each(observeReader.valueReaders, function(reader){ | ||
observeReader.valueReaders.forEach(function(reader){ | ||
observeReader.valueReadersMap[reader.name] = reader; | ||
@@ -337,0 +334,0 @@ }); |
{ | ||
"name": "can-stache-key", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Read and write keys on a value", | ||
@@ -52,4 +52,3 @@ "homepage": "https://canjs.com", | ||
"can-reflect-promise": "^2.0.0", | ||
"can-symbol": "^1.0.0", | ||
"can-util": "^3.9.0" | ||
"can-symbol": "^1.0.0" | ||
}, | ||
@@ -56,0 +55,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
25694
550
- Removedcan-util@^3.9.0
- Removedcan-ajax@1.4.1(transitive)
- Removedcan-cid@1.3.1(transitive)
- Removedcan-deparam@1.2.3(transitive)
- Removedcan-dom-data-state@0.2.0(transitive)
- Removedcan-event-dom-enter@1.0.4(transitive)
- Removedcan-event-dom-radiochange@1.0.5(transitive)
- Removedcan-param@1.2.0(transitive)
- Removedcan-parse-uri@1.2.2(transitive)
- Removedcan-types@1.4.0(transitive)
- Removedcan-util@3.14.0(transitive)