index.js
function(context){
    Object.defineProperty(context, 'length', {
        get: function() {
            var count = 0;

            // count valid accounts in browser storage
            _.each(this.get(), function(account, accountIndex){
                if(_.isUndefined(account)
                  || !_.isObject(account)
                  || _.isString(account))
                    return;

                if(!_.has(account, 'encrypted')
                   || !_.has(account, 'private'))
                    return;

                count += 1;
            });

            return count;
        }
    });
}
function(context){
    Object.defineProperty(context, 'length', {
        get: function() {
            var count = 0;

            // count valid accounts in browser storage
            _.each(this.get(), function(account, accountIndex){
                if(_.isUndefined(account)
                  || !_.isObject(account)
                  || _.isString(account))
                    return;

                if(!_.has(account, 'encrypted')
                   || !_.has(account, 'private'))
                    return;

                count += 1;
            });

            return count;
        }
    });
}
function ( context ) { Object . defineProperty ( context , 'length' , { get : function ( ) { var count = 0 ; // count valid accounts in browser storage _ . each ( this . get ( ) , function ( account , accountIndex ) { if ( _ . isUndefined ( account ) || ! _ . isObject ( account ) || _ . isString ( account ) ) return ; if ( ! _ . has ( account , 'encrypted' ) || ! _ . has ( account , 'private' ) ) return ; count += 1 ; } ) ; return count ; } } ) ; }
Define object properties such as 'length'.

@method (defineProperties)
@param {Object} context     The Accounts object context
Define object properties such as length .