node_modules/cssstyle/lib/properties/backgroundAttachment.js

Maintainability

83.70

Lines of code

22

Created with Raphaël 2.1.002550751002015-1-52014-12-42014-12-3

2015-5-18
Maintainability: 83.7

Created with Raphaël 2.1.007.51522.5302015-1-52014-12-42014-12-3

2015-5-18
Lines of Code: 22

Difficulty

11.75

Estimated Errors

0.16

Function weight

By Complexity

Created with Raphaël 2.1.0isValid3

By SLOC

Created with Raphaël 2.1.0set6
1
'use strict';
Column: 1 "Use the function form of "use strict"."
2
 
3
var parsers = require('../parsers');
Column: 15 "'require' is not defined."
4
 
5
var isValid = module.exports.isValid = function isValid(v) {
Column: 15 "'module' is not defined."
6
    return parsers.valueType(v) === parsers.TYPES.KEYWORD &&
7
        (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');
8
};
9
 
10
module.exports.definition = {
Column: 1 "'module' is not defined."
11
    set: function (v) {
12
        if (!isValid(v)) {
13
            return;
14
        }
15
        this._setProperty('background-attachment', v);
16
    },
17
    get: function () {
18
        return this.getPropertyValue('background-attachment');
19
    },
20
    enumerable: true,
21
    configurable: true
22
};