Code coverage report for stylus-lint/src/checks/checkForHashEnd.js

Statements: 100% (7 / 7)      Branches: 100% (8 / 8)      Functions: 100% (1 / 1)      Lines: 100% (6 / 6)      Ignored: none     

All files » stylus-lint/src/checks/ » checkForHashEnd.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16    1     1 11089     11087 23     11064    
'use strict';
 
var hashEnding = /^\}/;
 
// check if we're ending a hash
module.exports = function checkForHashEnd( line, areWeInAHash ) {
    if ( typeof areWeInAHash === 'undefined' || typeof line !== 'string' ) { return; }
 
    // ex }, but only if we've already establish that we're in a hash'
    if ( hashEnding.test(line) && areWeInAHash ) {
        return true;
    }
    else {
        return false;
    }
}