Comparing version 2.0.0 to 2.1.0
(function() { | ||
'use strict'; | ||
var CND, alert, badge, debug, help, info, misfit, provide_library, rpr, urge, warn, whisper; | ||
var CND, alert, badge, cast, debug, help, info, isa, misfit, provide_library, rpr, type_of, types, urge, validate, warn, whisper; | ||
@@ -29,2 +29,6 @@ //########################################################################################################### | ||
types = require('./types'); | ||
({isa, validate, cast, type_of} = types); | ||
//----------------------------------------------------------------------------------------------------------- | ||
@@ -45,6 +49,6 @@ /* rewrite using MultiMix` */ | ||
this._mark_as_primary = function(x) { | ||
return PD.new_system_datom('XEMITTER-preferred', x); | ||
return DATOM.new_datom('~XEMITTER-preferred', x); | ||
}; | ||
this._filter_primary = function(x) { | ||
return PD.select(x, '~XEMITTER-preferred'); | ||
return DATOM.select(x, '~XEMITTER-preferred'); | ||
}; | ||
@@ -58,3 +62,3 @@ //--------------------------------------------------------------------------------------------------------- | ||
} | ||
return (ref = primary_responses[0]) != null ? ref.value : void 0; | ||
return (ref = primary_responses[0]) != null ? ref.$value : void 0; | ||
}; | ||
@@ -74,5 +78,3 @@ //--------------------------------------------------------------------------------------------------------- | ||
} | ||
if (!((CND.isa_text(key)) && (key.length > 0))) { | ||
throw new Error(`µ67800 expected a non-empty text for key, got ${rpr(key)}`); | ||
} | ||
validate.nonempty_text(key); | ||
return [key, self, listener]; | ||
@@ -102,3 +104,10 @@ }; | ||
case 1: | ||
[key, d] = [key.$key, key]; | ||
if (isa.text(key)) { | ||
[key, d] = [key, key]; | ||
} else { | ||
if (!DATOM.is_datom(key)) { | ||
throw new Error(`µ44422 expected a text or a datom got a ${type_of(key)}`); | ||
} | ||
[key, d] = [key.$key, key]; | ||
} | ||
break; | ||
@@ -164,4 +173,3 @@ case 2: | ||
value = ref[name]; | ||
if (!CND.isa_function(value.bind)) { | ||
/* TAINT poor man's 'callable' detection */ | ||
if (!isa.function(value.bind)) { | ||
continue; | ||
@@ -168,0 +176,0 @@ } |
{ | ||
"name": "datom", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "standardized immutable objects in the spirit of datomic, especially suited for use in data pipelines", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
Sorry, the diff of this file is not supported yet
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
92504
1307