src/index.js
function all(datastore, kind, namespace) {
    return function(cb) {
        var query = null;
        if (namespace) {
            query = datastore.createQuery(namespace, kind);
        } else {
            query = datastore.createQuery(kind);
        }

        datastore.runQuery(query, function(err, entities) {
            if (err)
                return cb(err);

            var list = (entities || []).map(function(entity) {
                return entity;
            });

            cb(null, list);
        });

    };
}
function all(datastore, kind, namespace) {
    return function(cb) {
        var query = null;
        if (namespace) {
            query = datastore.createQuery(namespace, kind);
        } else {
            query = datastore.createQuery(kind);
        }

        datastore.runQuery(query, function(err, entities) {
            if (err)
                return cb(err);

            var list = (entities || []).map(function(entity) {
                return entity;
            });

            cb(null, list);
        });

    };
}
function all ( datastore , kind , namespace ) { return function ( cb ) { var query = null ; if ( namespace ) { query = datastore . createQuery ( namespace , kind ) ; } else { query = datastore . createQuery ( kind ) ; } datastore . runQuery ( query , function ( err , entities ) { if ( err ) return cb ( err ) ; var list = ( entities || [ ] ) . map ( function ( entity ) { return entity ; } ) ; cb ( null , list ) ; } ) ; } ; }
Given a datastore reference and a kind, will return a function that will return all stored entities.

@param {Object} datastore A reference to the datastore Object
@param {String} kind The entity kind
@returns {Function} The all function
Given a datastore reference and a kind will return a function that will return all stored entities .