ac-bundle-module-api-luminati

api/luminati.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: requestCallback

requestCallback

async function(callback, errorCallback, type, url, method, data, headers) {
  if (!app.has(type)) type = "static";
  if (config.api.log.url) console.log(url);
  var proxyUrl = config.luminati.url[type];
  var result = await app.utils.proxy.fetch(proxyUrl, url, method,

ac-bundle-module-api-fortnox

api/fortnox.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: headers, requestCallback

headers

function(headers) {
  if (typeof headers === "undefined") headers = {};
  headers["Access-Token"] = config.fortnox.accessToken;
  headers["Client-Secret"] = config.fortnox.clientSecret;
  headers["Content-Type"] = "application/json";
  headers["Accept"] = "application/json";
  return headers;
}

requestCallback

async

ac-bundle-module-api-dropbox

api/dropbox.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: upload

upload

async function(path, data, headers) {
  if (!app.has(headers)) headers = {};
  headers["Authorization"] = "Bearer " + config.dropbox.token;
  headers["Dropbox-API-Arg"] = JSON.stringify({path: config.dropbox.folder + path});
  var result = await fetch(config.dropbox.link +

ac-bundle-module-api-catalog

api/catalog.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: fileCallback

fileCallback

async function(callback, errorCallback, key, method, data, headers) {
  if (!app.has(method)) method = "GET";
  if (!app.has(headers)) headers = {};
  if (!app.has(headers["file-type"])) headers["file-type"] = "*";
  headers.authorization = config.catalog.authorization;
  var url

ac-bundle-module-utils-airtable-image

utils/airtable/image.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: fill

fill

function(record, key, value) {
  if (app.has(value) && value !== false) {
    var list = [];
    if (typeof value === "string") {
      list.push({url: value});
    } else {
      for (var

ac-bundle-module-utils-key

utils/key.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: length, count, token, make

length

20
count

4
token

function() {
  var str = "";
  for (var i=0; i<=mod.count-1; i++) {
    if (str !== "") str += "-";
    str += mod.make(mod.length);
  }

ac-bundle-module-utils-email

utils/email.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: valid

valid

function(email) {
  var re = /^(([^()[\]\\.,;:\s@"]+(\.[^()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
  return re.test(String(email).toLowerCase());
}

Happy Coding!…

ac-bundle-module-utils-date

utils/date.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: fill, beginning, yesterday, format, valid

fill

function(number, length) {
  while (String(number).length < length) number = "0" + String(number);
  return number;
}

beginning

function(years) {
  if (typeof years !== "number") years = config.api.years;
  var date = new Date();

ac-bundle-module-utils-crypto

utils/crypto.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: md5

md5

function(a) {
  var r = 0, c = "";
  return h(a);
  function h(t) {
    return u(l(m(t)));
  }
  function l(t) {
    return p(g(f(t), 8 * t.length));
  }
  function u(t)

ac-bundle-module-utils-jsontocsv

utils/jsontocsv.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: clean, convert

clean

function(value) {
  if (app.has(value) !== true) value = "";
  if (typeof value === "object") value = value.join(", ");
  if (typeof value === "number") value = String(value);
  return