node_modules/es5-ext/object/mixin.js

Maintainability

71.91

Lines of code

19

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

2015-5-18
Maintainability: 71.91

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

2015-5-18
Lines of Code: 19

Difficulty

11.94

Estimated Errors

0.12

Function weight

By Complexity

Created with Raphaël 2.1.0module.exports2

By SLOC

Created with Raphaël 2.1.0module.exports11
1
'use strict';
Column: 1 "Use the function form of "use strict"."
2
 
3
var value = require('./valid-value')
Column: 36 "Bad line breaking before ','."
Column: 13 "'require' is not defined."
4
 
5
  , defineProperty = Object.defineProperty
Column: 3 "Comma warnings can be turned off with 'laxcomma'."
Column: 29 "Bad line breaking before ','."
6
  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
Column: 39 "Bad line breaking before ','."
7
  , getOwnPropertyNames = Object.getOwnPropertyNames;
8
 
9
module.exports = function (target, source) {
Column: 1 "'module' is not defined."
10
    var error;
11
    target = Object(value(target));
12
    getOwnPropertyNames(Object(value(source))).forEach(function (name) {
13
        try {
14
            defineProperty(target, name, getOwnPropertyDescriptor(source, name));
15
        } catch (e) { error = e; }
16
    });
17
    if (error !== undefined) throw error;
18
    return target;
19
};