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

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

All files » stylus-lint/src/checks/ » checkForHashStart.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16      1   1 11225     11224 19     11205    
'use strict';
 
// check if we're starting a hash
var hashStarting = /\{$/;
 
module.exports = function checkForHashStart( line ) {
    if ( typeof line !== 'string' ) { return; }
 
    // ex colorsHash = {
    if ( hashStarting.test(line) && line.indexOf('=') !== -1 ) {
        return true;
    }
    else {
        return false;
    }
}