How to use unknown - 4 common examples

To help you get started, we’ve selected a few unknown examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CommerceRack / anycommerce / variations.js View on Github external
var $formFieldLabel = $('<label>').attr({"for":"pog_"+safeid,"id":"pog_"+safeid+"_id","title":labelTitle}).text(pog.prompt);

	$formFieldDiv.append($formFieldLabel);
	
//Push the new div into a div with id JSONPogDisplay as a new child.
//	var $displayObject = $("#JSONPogDisplay_"+pid);
//	$displayObject.append($formFieldDiv);   /// NOTE the form ID on this should probably be auto-generated from the element ID.

    if (this.handlers["pogid."+pogid]) {
      $optionObj = eval("this."+this.handlers["pogid."+pogid]+"(pog,safeid)");
      }
    else if (this.handlers["type."+pog.type]) {
      $optionObj = eval("this."+this.handlers["type."+pog.type]+"(pog,safeid)");
      }
    else {
      $optionObj = eval("this."+this.handlers["unknown."]+"(pog,safeid)");
      }
	$formFieldDiv.append($optionObj);
	return $formFieldDiv;
  }

</label>
github CommerceRack / anycommerce / includes.js View on Github external
var $formFieldLabel = $('<label>').attr({"title":labelTitle}).addClass("label_"+pog.type).text(pog.prompt);

	$formFieldDiv.append($formFieldLabel);
	
//Push the new div into a div with id JSONPogDisplay as a new child.
//	var $displayObject = $("#JSONPogDisplay_"+pid);
//	$displayObject.append($formFieldDiv);   /// NOTE the form ID on this should probably be auto-generated from the element ID.

    if (this.handlers["pogid."+pogid]) {
      $optionObj = eval("this."+this.handlers["pogid."+pogid]+"(pog)");  // this[this.handlers["pogid."+pogid]](pog)
      }
    else if (this.handlers["type."+pog.type]) {
      $optionObj = eval("this."+this.handlers["type."+pog.type]+"(pog)");
      }
    else {
      $optionObj = eval("this."+this.handlers["unknown."]+"(pog)");
      }
	$formFieldDiv.append($optionObj);
	return $formFieldDiv;
  }
</label>
github wso2 / carbon-mediation / components / mediation-ui / org.wso2.carbon.endpoint.ui / src / main / resources / web / endpoints / js / endpoint-util.js View on Github external
function(data, status) {
                       if (data.replace(/^\s+|\s+$/g, '') == 'success') {
                           CARBON.showInfoDialog(jsi18n['valid.address'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'unknown') {
                           CARBON.showErrorDialog(jsi18n['unknown.address'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'malformed') {
                           CARBON.showErrorDialog(jsi18n['malformed.address'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'ssl_error') {
                           CARBON.showErrorDialog(jsi18n['ssl.error'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'unknown_service') {
                           CARBON.showErrorDialog(jsi18n['unknown.service'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'unsupported') {
                           CARBON.showErrorDialog(jsi18n['unsupported.protocol']);
                       } else {
                           CARBON.showErrorDialog(jsi18n['invalid.address']);
                       }
                   });
    }
github wso2 / carbon-mediation / components / mediation-ui / org.wso2.carbon.endpoint.ui / src / main / resources / web / endpoints / js / endpoint-util.js View on Github external
function(data, status) {
                       if (data.replace(/^\s+|\s+$/g, '') == 'success') {
                           CARBON.showInfoDialog(jsi18n['valid.address'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'unknown') {
                           CARBON.showErrorDialog(jsi18n['unknown.address'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'malformed') {
                           CARBON.showErrorDialog(jsi18n['malformed.address'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'ssl_error') {
                           CARBON.showErrorDialog(jsi18n['ssl.error'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'unknown_service') {
                           CARBON.showErrorDialog(jsi18n['unknown.service'] + " " + url);
                       } else if (data.replace(/^\s+|\s+$/g, '') == 'unsupported') {
                           CARBON.showErrorDialog(jsi18n['unsupported.protocol']);
                       } else {
                           CARBON.showErrorDialog(data);
                       }
                   });
    }

unknown

A TypeScript utility library for interacting with the 'unknown' type.

MIT
Latest version published 8 months ago

Package Health Score

55 / 100
Full package analysis

Popular unknown functions