core/asset/js/plugin/dist/gina.min.js
function collectionDelete(filter) {

        if ( typeof(filter) !== 'object' ) {
            throw new Error('filter must be an object');
        } else {
            var content     = JSON.parse(JSON.stringify( collections[ this['_collection'] ] ))
                //, condition = filter.count()
                , i         = 0
                , found     = [];

            for (var o in content) {
                for (var f in filter) {
                    if ( filter[f] && keywords.indexOf(filter[f].toLocaleLowerCase()) > -1 && filter[f].toLowerCase() == 'not null' && typeof(content[o][f]) != 'undefined' && typeof(content[o][f]) !== 'object' && content[o][f] != 'null' && content[o][f] != 'undefined' ) {
                        if (found.indexOf(content[o][f]) < 0 ) {
                            found[i] = content[o][f];
                            delete collections[ this['_collection'] ][o][f];
                            ++i
                        }

                    } else if ( typeof(content[o][f]) != 'undefined' && typeof(content[o][f]) !== 'object' && content[o][f] === filter[f] ) {
                        found[i] = content[o];
                        collections[ this['_collection'] ].splice(o, 1);
                        ++i
                    }
                }
            }
        }

        if (found.length > 0 ) {
            storage.setItem(this['_bucket'], JSON.stringify(collections));
            return true
        }

        return false
    }
function collectionDelete(filter) {

        if ( typeof(filter) !== 'object' ) {
            throw new Error('filter must be an object');
        } else {
            var content     = JSON.parse(JSON.stringify( collections[ this['_collection'] ] ))
                //, condition = filter.count()
                , i         = 0
                , found     = [];

            for (var o in content) {
                for (var f in filter) {
                    if ( filter[f] && keywords.indexOf(filter[f].toLocaleLowerCase()) > -1 && filter[f].toLowerCase() == 'not null' && typeof(content[o][f]) != 'undefined' && typeof(content[o][f]) !== 'object' && content[o][f] != 'null' && content[o][f] != 'undefined' ) {
                        if (found.indexOf(content[o][f]) < 0 ) {
                            found[i] = content[o][f];
                            delete collections[ this['_collection'] ][o][f];
                            ++i
                        }

                    } else if ( typeof(content[o][f]) != 'undefined' && typeof(content[o][f]) !== 'object' && content[o][f] === filter[f] ) {
                        found[i] = content[o];
                        collections[ this['_collection'] ].splice(o, 1);
                        ++i
                    }
                }
            }
        }

        if (found.length > 0 ) {
            storage.setItem(this['_bucket'], JSON.stringify(collections));
            return true
        }

        return false
    }
function collectionDelete ( filter ) { if ( typeof ( filter ) !== 'object' ) { throw new Error ( 'filter must be an object' ) ; } else { var content = JSON . parse ( JSON . stringify ( collections [ this [ '_collection' ] ] ) ) //, condition = filter.count() , i = 0 , found = [ ] ; for ( var o in content ) { for ( var f in filter ) { if ( filter [ f ] && keywords . indexOf ( filter [ f ] . toLocaleLowerCase ( ) ) > - 1 && filter [ f ] . toLowerCase ( ) == 'not null' && typeof ( content [ o ] [ f ] ) != 'undefined' && typeof ( content [ o ] [ f ] ) !== 'object' && content [ o ] [ f ] != 'null' && content [ o ] [ f ] != 'undefined' ) { if ( found . indexOf ( content [ o ] [ f ] ) < 0 ) { found [ i ] = content [ o ] [ f ] ; delete collections [ this [ '_collection' ] ] [ o ] [ f ] ; ++ i } } else if ( typeof ( content [ o ] [ f ] ) != 'undefined' && typeof ( content [ o ] [ f ] ) !== 'object' && content [ o ] [ f ] === filter [ f ] ) { found [ i ] = content [ o ] ; collections [ this [ '_collection' ] ] . splice ( o , 1 ) ; ++ i } } } } if ( found . length > 0 ) { storage . setItem ( this [ '_bucket' ] , JSON . stringify ( collections ) ) ; return true } return false }
Delete from collection

@param {object} filter

@return {array} result
Delete from collection