How to use the lazy.extendSome function in lazy

To help you get started, we’ve selected a few lazy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github persvr / pintura / lib / facet.js View on Github external
return when(source, function(source){
				throw new DatabaseError(3, "not found");
			if(source instanceof Array){
				// this handles query results, but probably should create a branch for real arrays 
				var results = extendSome({
					some: function(callback){
							callback((item && typeof item == "object" && wrap(item, transaction, item, true)) || item);
					length: source.length,
				results.totalCount = source.totalCount;
				return results;
			var instancePrototype = Object.create(facetPrototype);
			defineProperties(instancePrototype, {
				load: {
					value: function(){
						if(facetSchema.allowed && !facetSchema.allowed(transaction.env, source)){
							throw new AccessError("Access denied to " + source);


Lazy lists for node

Latest version published 11 years ago

Package Health Score

67 / 100
Full package analysis