Your IP : 216.73.216.86


Current Path : /home/emeraadmin/www/4d695/
Upload File :
Current File : /home/emeraadmin/www/4d695/util.js.tar

home/emeraadmin/public_html/node_modules/c3/src/util.js000064400000003262151701400730017165 0ustar00export var asHalfPixel = function(n) {
    return Math.ceil(n) + 0.5;
};
export var ceil10 = function(v) {
    return Math.ceil(v / 10) * 10;
};
export var diffDomain = function(d) {
    return d[1] - d[0];
};
export var getOption = function(options, key, defaultValue) {
    return isDefined(options[key]) ? options[key] : defaultValue;
};
export var getPathBox = function(path) {
    var box = path.getBoundingClientRect(),
        items = [path.pathSegList.getItem(0), path.pathSegList.getItem(1)],
        minX = items[0].x,
        minY = Math.min(items[0].y, items[1].y);
    return { x: minX, y: minY, width: box.width, height: box.height };
};
export var hasValue = function(dict, value) {
    var found = false;
    Object.keys(dict).forEach(function(key) {
        if (dict[key] === value) { found = true; }
    });
    return found;
};
export var isArray = function(o) {
    return Array.isArray(o);
};
export var isDefined = function(v) {
    return typeof v !== 'undefined';
};
export var isEmpty = function(o) {
    return typeof o === 'undefined' || o === null || (isString(o) && o.length === 0) || (typeof o === 'object' && Object.keys(o).length === 0);
};
export var isFunction = function(o) {
    return typeof o === 'function';
};
export var isString = function(o) {
    return typeof o === 'string';
};
export var isUndefined = function(v) {
    return typeof v === 'undefined';
};
export var isValue = function(v) {
    return v || v === 0;
};
export var notEmpty = function(o) {
    return !isEmpty(o);
};
export var sanitise = function(str) {
    return typeof str === 'string' ? str.replace(/</g, '&lt;').replace(/>/g, '&gt;') : str;
};
home/emeraadmin/public_html/node_modules/react-dnd-scrollzone-patch-react-17/lib/util.js000064400000000766151701442440025320 0ustar00"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.noop = noop;
exports.intBetween = intBetween;
exports.getCoords = getCoords;

function noop() {}

function intBetween(min, max, val) {
  return Math.floor(Math.min(max, Math.max(min, val)));
}

function getCoords(evt) {
  if (evt.type === 'touchmove') {
    return {
      x: evt.changedTouches[0].clientX,
      y: evt.changedTouches[0].clientY
    };
  }

  return {
    x: evt.clientX,
    y: evt.clientY
  };
}