core/asset/js/plugin/dist/gina.min.js
function Collection(name) {
        // retrieve collections state
        collections = JSON.parse(storage.getItem(this['bucket']));
        //console.log('collections ', (collections || null) );
        if ( typeof(collections[name]) == 'undefined' ) {
            collections[name] = [];
            storage.setItem(this['bucket'], JSON.stringify(collections));
            collections = JSON.parse(storage.getItem(this['bucket']));
        }

        entities[name]      = { '_collection': name, '_bucket': this['bucket'] };
        entities[name]      = merge(entities[name], entityProto);

        return entities[name]
    }
function Collection(name) {
        // retrieve collections state
        collections = JSON.parse(storage.getItem(this['bucket']));
        //console.log('collections ', (collections || null) );
        if ( typeof(collections[name]) == 'undefined' ) {
            collections[name] = [];
            storage.setItem(this['bucket'], JSON.stringify(collections));
            collections = JSON.parse(storage.getItem(this['bucket']));
        }

        entities[name]      = { '_collection': name, '_bucket': this['bucket'] };
        entities[name]      = merge(entities[name], entityProto);

        return entities[name]
    }
function Collection ( name ) { // retrieve collections state collections = JSON . parse ( storage . getItem ( this [ 'bucket' ] ) ) ; //console.log('collections ', (collections || null) ); if ( typeof ( collections [ name ] ) == 'undefined' ) { collections [ name ] = [ ] ; storage . setItem ( this [ 'bucket' ] , JSON . stringify ( collections ) ) ; collections = JSON . parse ( storage . getItem ( this [ 'bucket' ] ) ) ; } entities [ name ] = { '_collection' : name , '_bucket' : this [ 'bucket' ] } ; entities [ name ] = merge ( entities [ name ] , entityProto ) ; return entities [ name ] }
Create or Get Collection by name

@param {string} name - Collection name
Create or Get Collection by name