Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
calc_breakpoint(width, steps) {
var breakpoints, point;
breakpoints = (this.state && this.state.breakpoints) || defaultBreakpoints;
if (Util.isFunction(breakpoints)) {
return breakpoints(width, steps);
} else {
if (Util.isString(breakpoints)) {
breakpoints = ((function () {
var j, len, ref, results;
ref = breakpoints.split(',');
results = [];
for (j = 0, len = ref.length; j < len; j++) {
point = ref[j];
results.push(parseInt(point));
}
return results;
})()).sort(function (a, b) {
return a - b;
});
}