Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

can-stache-key

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-stache-key - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

5

can-stache-key-test.js

@@ -253,1 +253,6 @@ var observeReader = require("can-stache-key");

});
test("it returns null when promise getter is null #2", function(){
var nullPromise = observeReader.read(null, observeReader.reads('value'));
QUnit.equal(typeof nullPromise,"object");
});

2

can-stache-key.js

@@ -190,3 +190,3 @@ var Observation = require('can-observation');

// special reflections.
if(isPromiseLike(value) || typeof value === "object" && typeof value.then === "function") {
if(isPromiseLike(value) || typeof value === "object" && value && typeof value.then === "function") {
canReflectPromise(value);

@@ -193,0 +193,0 @@ }

@@ -1,3 +0,14 @@

/*can-stache-key@0.0.2#can-stache-key*/
define(function (require, exports, module) {
/*can-stache-key@0.0.3#can-stache-key*/
define([
'require',
'exports',
'module',
'can-observation',
'can-util/js/dev',
'can-util/js/each',
'can-symbol',
'can-reflect',
'can-util/js/is-promise-like',
'can-reflect-promise'
], function (require, exports, module) {
var Observation = require('can-observation');

@@ -139,3 +150,3 @@ var dev = require('can-util/js/dev');

test: function (value) {
if (isPromiseLike(value) || typeof value === 'object' && typeof value.then === 'function') {
if (isPromiseLike(value) || typeof value === 'object' && value && typeof value.then === 'function') {
canReflectPromise(value);

@@ -142,0 +153,0 @@ }

@@ -1,2 +0,2 @@

/*can-stache-key@0.0.2#can-stache-key*/
/*can-stache-key@0.0.3#can-stache-key*/
var Observation = require('can-observation');

@@ -138,3 +138,3 @@ var dev = require('can-util/js/dev/dev');

test: function (value) {
if (isPromiseLike(value) || typeof value === 'object' && typeof value.then === 'function') {
if (isPromiseLike(value) || typeof value === 'object' && value && typeof value.then === 'function') {
canReflectPromise(value);

@@ -141,0 +141,0 @@ }

@@ -40,2 +40,11 @@ /*[global-shim-start]*/

};
var hasCjsDependencies = function(deps) {
return (
deps[0] === "require" &&
deps[1] === "exports" &&
deps[2] === "module"
);
};
var modules = (global.define && global.define.modules) ||

@@ -55,8 +64,9 @@ (global._define && global._define.modules) || {};

// CJS has no dependencies but 3 callback arguments
if(!deps.length && callback.length) {
if (hasCjsDependencies(deps) || (!deps.length && callback.length)) {
module = { exports: {} };
var require = function(name) {
args[0] = function(name) {
return exports[name] ? get(exports[name]) : modules[name];
};
args.push(require, module.exports, module);
args[1] = module.exports;
args[2] = module;
}

@@ -112,4 +122,15 @@ // Babel uses the exports and module object.

)
/*can-stache-key@0.0.2#can-stache-key*/
define('can-stache-key', function (require, exports, module) {
/*can-stache-key@0.0.3#can-stache-key*/
define('can-stache-key', [
'require',
'exports',
'module',
'can-observation',
'can-util/js/dev/dev',
'can-util/js/each/each',
'can-symbol',
'can-reflect',
'can-util/js/is-promise-like/is-promise-like',
'can-reflect-promise'
], function (require, exports, module) {
var Observation = require('can-observation');

@@ -251,3 +272,3 @@ var dev = require('can-util/js/dev/dev');

test: function (value) {
if (isPromiseLike(value) || typeof value === 'object' && typeof value.then === 'function') {
if (isPromiseLike(value) || typeof value === 'object' && value && typeof value.then === 'function') {
canReflectPromise(value);

@@ -254,0 +275,0 @@ }

{
"name": "can-stache-key",
"version": "0.0.3",
"version": "0.0.4",
"description": "Read and write keys on a value",

@@ -5,0 +5,0 @@ "homepage": "https://canjs.com",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc