New Entity

Draft 1.0:
Index







Sections: Status -> Approved

Installation - Install a New Entity™

1.) cleanValue - I/O value formatting

2.) createOrigin - Define Origin locations and base environment variables

3.) entityMap - Define Maps to discoverable metaclass objects.

4.) interactionsXY - XY Interaction building blocks

5.) newentity - Optimized Response Code

6.) presentEntity - Define Entity display definitions

7.) tempoCommunicate - Time logic-engine and server communication decider

8.) windowView - Define View logic and add enhanced visual features

9.) index - Default Starting Page

10.) sitemap - Default Base Page

11.) /textpage/plain Default Base Page

Extensions: Extend your New Entity™



Source Code: cleanValue.js



Purpose: I/O Response Value Formatting

Additional Usage: Replace form Input variables, extend allowed strings and create transparent rulesets for clients. Rulesets can be alterend or extended according to needed policy.

                
// Copyright (C) 2020 New Entity Operations Inc.
// P1: cleanValue.js
// https://NewEntity.io/section/1/
// cleanValue.js
// Version 0.4 (12/24/2020)
// On top of server side validation which is also in place, values can be stripped of harmful content before posting
var urlFullPathContact = "https://newentity.io/contact/";
const buttonContact = document.getElementById("buttonContact");
const enforceHTTPS = 1;
let listCurred = [];
// By field Map

function inputCleanValue (assembledString, a=0, b=0, c=0) {
  // Submit here
  if (a>0) {
    let neededStringA = assembledString;
    console.log(neededStringA);
  }
  if (b>0) {
    let neededStringB = assembledString;
    console.log(neededStringB);
  }
  if (c>0) {
    let neededStringC = assembledString;
    console.log(neededStringC);
  }
  // console.log("The contact button was pressed. Thank you. I'll be in touch soon.");
}
function moduleContactInstance (fieldValue) {
  let counterCure = 0;
  // Call stack begins here
  var valueCleanInplaceList = new Map([
    ["<", "\/<\/"],
    [">", "\/>\/"],
    ["?", "\/?\/"],
    ["/", "\/(/)\/"],
    ["#", "\/#\/"],
    ["&", "\/&\/"]
  ]);
  function processTranslation (a=0, b=0, c=0) {
    var assessValue = fieldValue[counterCure];
    try {
      var cureThisValue = valueCleanInplaceList.get(assessValue);
      listCurred.push(cureThisValue);
    } catch (err) {
      listCurred.push(assessValue);
    }
  }
  while (counterCure < fieldValue.length) {
    processTranslation();
    counterCure++;
  }
  let assembledString = listCurred.toString();
  inputCleanValue(assembledString, a, b, c);
}

try {
buttonContact.addEventListener('click', function () {
  // perform the routine for each required field
  let retrievalDOMFieldValueA = document.getElementById("name").value;
  fieldValueA = [];
  function StringA () {
     fieldValueA = retrievalDOMFieldValueA.split();
  }
  StringA(a=1, b=0, c=0);
  moduleContactInstance(fieldValue=fieldValueA);

  let retrievalDOMFieldValueB = document.getElementById("your_message").value;
  fieldValueB = [];
  function StringB () {
    fieldValueB = retrievalDOMFieldValueB.split();
  }
  StringB(a=0, b=1, c=0);
  moduleContactInstance(fieldValue=fieldValueB);

  let retrievalDOMFieldValueC = document.getElementById("contact_here").value;
  fieldValueC = [];
  function StringC () {
    fieldValueC = retrievalDOMFieldValueC.split();
  }
  StringC(a=0, b=0, c=1);
  moduleContactInstance(fieldValue=fieldValueC);
  // Finalize the run
  listCurred = [];
  // Finalize Request
  const tokenCSRF = document.getElementById("csrf_token").value;
  const fieldType = document.getElementById("type").value;
  const ageRange = document.getElementById("age").value;

  let objectRequestPOST = {
    "csrf_token": tokenCSRF,
    "name": neededStringA,
    "type": fieldType,
    "your_message": neededStringB,
    "contact_here": neededStringC,
    "age": ageRange
  }
  makeRequestPOST(objectRequestPOST);
  console.log("Token: generated");
})
} catch (error) {
  console.log("Token: none");
}
                
              

Copyright © 2020 New Entity Operations Inc. - All Rights Reserved
Terms of Service