Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/vreg/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/vreg/plugins/helpers.js
import Vue from 'vue'
import _ from 'lodash'

var VueScrollTo = require('vue-scrollto');

Vue.prototype.$scrollTo = (element, duration = 100, opts = {}) => {
  if (process.server) {
    return;
  }

  VueScrollTo.scrollTo(element, duration, opts)
};

Vue.prototype.$copyObject = object => _.cloneDeep(object);

Vue.prototype.$getFormInputErrors = (errors, field, form = null) => {

  if (errors.length) {
    return errors;
  }

  if (form && form.errors.has(field)) {
    return form.errors.get(field)
  }

  return [];

}


Vue.prototype.$haveSameData = (obj1, obj2) => {
  let obj1Length = Object.keys(obj1).length;
  let obj2Length = Object.keys(obj2).length;

  if (obj1Length === obj2Length) {
    return Object.keys(obj1).every((key) => {
      return obj1.hasOwnProperty(key) && obj2.hasOwnProperty(key) && (obj2[key] || '').toString().toLowerCase() == (obj1[key] || '').toString().toLowerCase();
    });
  }

  return false;

}
Vue.prototype.$money = (value) => {
  return new Intl.NumberFormat('en-US', {
    style: 'currency',
    currency: 'USD',
    minimumFractionDigits: 2
  }).format(value)
};

Spamworldpro Mini