| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/gavin/workspace/happymandarin/node_modules/table/dist/ |
Upload File : |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var cov_1fd7vh0l3t = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateCellWidthIndex.js',
hash = 'b9600d2c169ef60a6ea737b6fcbbb85c260df86f',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateCellWidthIndex.js',
statementMap: {
'0': {
start: {
line: 11,
column: 2
},
end: {
line: 13,
column: 5
}
},
'1': {
start: {
line: 12,
column: 4
},
end: {
line: 12,
column: 30
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 10,
column: 15
},
end: {
line: 10,
column: 16
}
},
loc: {
start: {
line: 10,
column: 26
},
end: {
line: 14,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 11,
column: 22
},
end: {
line: 11,
column: 23
}
},
loc: {
start: {
line: 11,
column: 33
},
end: {
line: 13,
column: 3
}
}
}
},
branchMap: {},
s: {
'0': 0,
'1': 0
},
f: {
'0': 0,
'1': 0
},
b: {}
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var _lodash = require('lodash');
var _lodash2 = _interopRequireDefault(_lodash);
var _stringWidth = require('string-width');
var _stringWidth2 = _interopRequireDefault(_stringWidth);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Calculates width of each cell contents.
*
* @param {string[]} cells
* @returns {number[]}
*/
exports.default = cells => {
++cov_1fd7vh0l3t.f[0];
++cov_1fd7vh0l3t.s[0];
return _lodash2.default.map(cells, value => {
++cov_1fd7vh0l3t.f[1];
++cov_1fd7vh0l3t.s[1];
return (0, _stringWidth2.default)(value);
});
};
module.exports = exports['default'];