ac-bundle-module-utils-user

utils/user.js

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

Available Methods: getByKey, getByKeyAndToken, getByEmail, list, save

getByKey

async function(key) {
  var {user, error} = await app.api.mysql.request("user", function(data) {}, `
    SELECT
      *
    FROM \`user\`
    WHERE
      \`key\`=` + app.api.mysql.escape(key) + `
  `);
  return

ac-bundle-module-utils-string

utils/string.js

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

Available Methods: toProperCase

toProperCase

function(str) {
  return str.replace(
    /\w\S*/g,
    function(txt) {
      return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
    }
  );
}

Happy Coding!…

ac-bundle-module-utils-password

utils/password.js

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

Available Methods: test, medium, strong

test

function(password, level) {
  if (typeof level === "undefined") level = "medium";
  return mod[level]().test(password);
}

medium

function() {
  return new RegExp("^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})");
}

strong

function() {
  return new

ac-bundle-module-storage-kv

storage/kv.js

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

Available Methods: namespace

namespace

function(namespaceKey) {
  var namespace = {
    get link() { return "getter"; return "getter";
      var link = "https://api.cloudflare.com/client/v4/accounts/" + appConfig.cloudflare.account + "/storage/kv/namespaces/" + namespaceKey;
      return link;
    },
    get: async

ac-bundle-module-api-mysql

api/mysql.js

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

Available Methods: escape, connect, requestCallback

escape

function(value) {
  return mysql.escape(value);
}

connect

function() {
  return new Promise(function(resolve, reject) {
    if (!app.has(mod.connection) || mod.connection.state.split("disconnect").length 1) {
      mod.connection = mysql.createConnection(appConfig.mysql);
      mod.connection.connect(function(error, data) {
        resolve(true);

ac-bundle-module-utils-compression

utils/compression.js

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

Available Methods: compress, decompress

compress

function(s) {
  var dict = {};
  var data = (s + "").split("");
  var out = [];
  var currChar;
  var phrase = data[0];
  var code = 256;
  for

ac-bundle-module-utils-metadata-airtable

utils/metadata/airtable.js

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

Available Methods: table

table

async function(base, table) {
  var {record, error} = await app.api.airtable.requestMetadata("record", function(json, page) {}, "Structure", "Grid view", [], "GET", "&filterByFormula=" + app.utils.url.encode("IF(AND(Base=\"" + base + "\", Table=\"" + table

ac-bundle-module-api-scraper

api/scraper.js

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

Available Methods: requestCallback

requestCallback

async function(callback, errorCallback, path) {
  var link = config.scraper.link + "/" + path.split("?").join("?authorization=" + config.scraper.authorization + "&");
  if (config.api.log.url) console.log("SCRAPER:", link);
  var result = await fetch(link);
  if (result.status

ac-bundle-module-api-oxr

api/oxr.js

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

Available Methods: list, number, convert

list

async function() {
  var result = await fetch(config.oxr.link + "/latest.json?app_id=" + config.oxr.appId, {
    method: "GET"
  });
  if (result.status === 200) {
    var json = await result.json();

ac-bundle-module-api-niolo

api/niolo.js

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

Available Methods: token, requestCallback

token

async function() {
  if (app.has(mod.jwt) && new Date().getTime() - mod.time 120000) return mod.jwt;
  var result = await fetch(config.niolo.endpoint + "/auth/local", {
    method: "POST",
    headers: {
      "Content-Type": "application/json"