Add Q features assumed by smart-contract code #266

Closed
wants to merge 3 commits into
from

Projects

None yet

3 participants

@erights
Collaborator

No description provided.

@kriskowal kriskowal and 1 other commented on an outdated diff Apr 8, 2013
q.js
+function passByCopy(obj) {
+ //freeze(obj);
+ //passByCopies.set(obj, true);
+ return obj;
+}
+
+/**
+ * Consider making this variadic
+ */
+Q.join = join;
+function join(x, y) {
+ return Q.all([x, y]).spread(function(x, y) {
+ if (x === y) {
+ // TODO: "===" should be Object.is or equiv
+ return x;
+ }
@kriskowal
kriskowal Apr 8, 2013

Indentation issue here.

@domenic
domenic Apr 8, 2013

Be sure to check for tabs; there were some of those in a81dbd4 :)

@kriskowal kriskowal commented on the diff Apr 8, 2013
return deferred.promise;
}
/**
+ * Will be relevant for remote
@kriskowal
kriskowal Apr 8, 2013

Will need to make this something similar to Q.master, but with the opposite meaning.

@erights
Collaborator

Hi @domenic, the array_reduce thing seems too heavy for something this simple, so I just converted to a for(;;) loop.

@kriskowal
Owner

I’ve rolled this into #339 which should land for the next version.

@kriskowal
Owner

These have been merged.

@kriskowal kriskowal closed this Jul 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment