ac-bundle-module-frontend-modules-storage

frontend/modules/storage.js

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

Available Methods: get, set

get

function(key, type) {
  if (!app.has(type)) type = "local";
  return window[type + "Storage"].getItem(key);
}

set

function(key, value, type) {
  if (!app.has(type)) type = "local";
  window[type + "Storage"].setItem(key, value);

ac-bundle-module-frontend-modules-transition

frontend/modules/transition.js

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

Available Methods: remove, start

remove

function(element) {
  element.className = element.className.split(" no-transition").join("");
}

start

function() {
  mod.remove(app.element);
}

Happy Coding!…

ac-bundle-module-api-leveldb

api/leveldb.js

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

Available Methods: levels, level, db, getCallback, putCallback

levels

[object Object]
level

[object Object]
db

function(path) {
  fs.mkdirSync("./" + path, {recursive: true});
  if (!app.has(mod.levels[path])) mod.levels[path] = mod.level(path);
  return mod.levels[path];
}

getCallback

async function(callback,

ac-bundle-module-utils-airtable-sync

utils/airtable/sync.js

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

Available Methods: records

records

async function(callbacks, configKey, sourceRecords, records, itemKey, table, fields) {
  if (typeof itemKey === "string") {
    var str = itemKey;
    itemKey = {left: str, right: str};
  };
  if (!app.has(sourceRecords))

ac-bundle-module-utils-hosting

utils/hosting.js

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

Available Methods: contentTypes, static

contentTypes

[object Object]
static

function(request, response) {
  if (app.has(app.hosting)) {
    var fs = require('fs');
    var path = require('path');
    var http = require('http');
    var resolvedBase = path.resolve(__dirname + "/hosting/");

ac-bundle-module-api-modernmt

api/modernmt.js

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

Available Methods: languagesCallback, translateWordCallback, translateHTMLCallback, translateCallback

languagesCallback

async function(callback, errorCallback) {
  var headers = {
    "Accept": "application/json",
    "Content-type": "application/json",
    "MMT-ApiKey": config.modernmt.key,
  };
  var result = await fetch(config.modernmt.link + "/languages", {headers: headers});
  if

ac-bundle-module-utils-text

utils/text.js

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

Available Methods: encodeEntities, decodeEntities, document, numeral, parse, strip, clean

encodeEntities

function encode(text, _a) {
    var _b = _a === void 0 ? defaultEncodeOptions : _a, _c = _b.mode, mode = _c ===

ac-bundle-module-utils-request

utils/request.js

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

Available Methods: data

data

async function(request, prop) {
  if (!app.has(prop)) prop = "";
  var data = await request.text();
  try { var json = JSON.parse(data); } catch (error) {}
  if (app.has(json)) {
    if

ac-bundle-module-utils-promise

utils/promise.js

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

Available Methods: wrap

wrap

function(value, p) {
  if (typeof value === "object") {
    p = value;
    value = "data";
  }
  return new Promise(function(resolve, reject) {
    p.then(function(d) {
      var data = {error: undefined};

ac-bundle-module-utils-username

utils/username.js

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

Available Methods: valid, exists

valid

function(value) {
  var re = /^\w+$/;
  return re.test(value) && value.length = 5;
}

exists

async function(username) {
  var {users, error} = await app.api.mysql.request("users", function(data) {}, `
    SELECT