fulfill 'name' field for objects under
        '#/definitions' and with 'properties'
164646
def _schema(self, path, obj, app):
        
        if path.startswith('#/definitions'):
            last_token = jp_split(path)[-1]
            if app.version == '1.2':
                obj.update_field('name', scope_split(last_token)[-1])
            else:
                obj.update_field('name', last_token)
596489
def derive_and_set_name_fields_and_slug(
            self, set_name_sort=True, set_slug=True
    ):
        
        # name_full is the primary required name field. It must be set.
        if is_empty(self.name_full):
            if not is_empty(self.name_display):
                self.name_full = self.name_display
            else:
                raise ValueError(
                    u"%s.name_full cannot be empty at save" % type(self).__name__)
        # if empty, `name_sort` == `name_full`
        if set_name_sort and is_empty(self.name_sort):
            self.name_sort = self.derive_sort_name()
        # if empty, `slug` is set to slugified `name_full`
        if set_slug and is_empty(self.slug):
            self.slug = slugify(self.name_display or self.name_full)
94974
def lookupFieldPropertyByName( fieldName, property )
      theproperty = nil
      if isValidFieldProperty?(property)
         fid = lookupFieldIDByName( fieldName )
         field = lookupField( fid ) if fid
         theproperty = field.elements[ property ] if field
         theproperty = theproperty.text if theproperty and theproperty.has_text?
      end
      theproperty
   end
538209
function defineProperties(obj) {
    Object.defineProperties(obj, {
        "pre": {
            value: Contract.pre,
            configurable: true
        },
        "post": {
            value: Contract.post,
            configurable: true
        },
        "invariant": {
            value: Contract.invariant,
            configurable: true
        }
    });
}
232240
def _resolve_definitions(self, schema, definitions):
        
        if not definitions:
            return schema

        if not isinstance(schema, dict):
            return schema

        ref = schema.pop('$ref', None)
        if ref:
            path = ref.split('/')[2:]
            definition = definitions
            for component in path:
                definition = definitions[component]

            if definition:
                # Only update specified fields
                for (key, val) in six.iteritems(definition):
                    if key not in schema:
                        schema[key] = val

        for key in six.iterkeys(schema):
            schema[key] = self._resolve_definitions(schema[key], definitions)

        return schema
864884
def makeref2namesdct(name2refdct):
    """"""
    ref2namesdct = {}
    for key, values in name2refdct.items():
        for value in values:
            ref2namesdct.setdefault(value, set()).add(key)
    return ref2namesdct
550018
def field_names(options)
      names = (as_attributes.keys + attribute_names).uniq.sort

      only = Array.wrap(options[:only]).map(&:to_s)
      except = Array.wrap(options[:except]).map(&:to_s)
      except |= ['_type'] unless Mongoid.include_type_for_serialization

      if !only.empty?
        names &= only
      elsif !except.empty?
        names -= except
      end
      names
    end
500411
function setter(obj, path, setValue, fullExp) {
   var element = path.split('.'),
      key;
   for (var i = 0; element.length > 1; i++) {
      key = ensureSafeMemberName(element.shift(), fullExp);
      var propertyObj = obj[key];
      if (!propertyObj) {
         propertyObj = {};
         obj[key] = propertyObj;
      }
      obj = propertyObj;
   }
   key = ensureSafeMemberName(element.shift(), fullExp);
   obj[key] = setValue;
   return setValue;
}
1169875
def names
      NAME_FIELDS.map { |k| has_field?(k) ? @fields[k].tokens : nil }.flatten.compact
    end
1226374
function(config, name, raw_tag) {

		if (Lava.schema.DEBUG && (name in config)) Lava.t("Object already exists: " + name + ". Ensure, that x:options and x:properties directives appear before x:option and x:property.");
		if (Lava.schema.DEBUG && (!raw_tag.content || raw_tag.content.length != 1)) Lava.t("Malformed directive or tag for config property: " + name);
		config[name] = Lava.parseOptions(raw_tag.content[0]);

	}
1199289
function generateHoistNameBasedOn(path, suffix = "") {
  const names = [];
  if (suffix) {
    names.push(suffix);
  }

  let current = path;
  while (!(current.isIdentifier() || current.isJSXIdentifier())) {
    names.push(current.node.property.name);
    current = current.get("object");
  }
  names.push(current.node.name);

  return path.scope.generateUidIdentifier(names.reverse().join("$"));
}
458251
def property name, prop
      return '' if EXCLUDE_PROPERTIES.include?(name.to_s) || prop.nil? || (prop.kind_of?(Array) && prop.empty?)
      
      prop = prop.flatten.map{|p| "'#{p}'"}.join(', ') if prop.respond_to?(:flatten) && name.to_sym != :folders
      prop = @paths.map{|f| "'#{f}'"}.join(',') if name.to_sym == :folders
      
      prop = "'#{prop.exec_rule}'" if prop.instance_of?(Syntaxer::Runner::ExecRule) && !prop.exec_rule.nil?
      prop = "Syntaxer::Runner.#{prop.language}" if prop.instance_of?(Syntaxer::Runner::ExecRule) && prop.exec_rule.nil?
      
      ' '*4 + "#{name.to_s} #{prop}\n"
    end
233094
def bind_key_name(self, function, object_name):
        """"""
        for funcname, name in self.name_map.items():
            if funcname == function:
                self.name_map[
                    funcname] = object_name
705093
function initField (form, args) {
    // field specification to return
    var field = {}
    // get model
    var model = form.model
    // set default based on schema data
    if (form.model.schemaData) {
        // get data properites from schema
        var properties = form.model.schemaData.properties
        // create lookup table of required properties
        var required = _.zipObject(form.model.schemaData.required, _.map(form.model.schemaData.required, () => true))
    }
    else {
        var properties = {}
        var required = {}
    }
    // string is passed then use as property name
    if (typeof args === 'string') {
        field.property = args
        // set args as empty object so that it can be checked for values
        args = {}
    }
    else {
        // require field to be object
        assert.ok(args && typeof args === 'object', 'field must be object')
        // field can be a section divider
        if (args.legend) {
            return args
        }
        else {
            // require field to have property
            assert.ok(typeof args.property === 'string' && args.property.length, 'field must have property')
            // set property from args
            field.property = args.property
        }
    }
    // if property is required make field required
    if (required[field.property]) {
        field.required = true
    }
    // set path base on property name
    field.path = changeCase.paramCase(field.property)
    // get property schema for field
    var schema = properties[field.property]
    // build field data from args and schema
    return buildField(args, field, form, model, schema)
}
400265
function findDefinition(schema, ref) {
  var propertyPath = ref.split('/').slice(1); // Ignore the #/uri at the beginning.
  var currentProperty = propertyPath.splice(0, 1)[0];

  var currentValue = schema;

  while (currentProperty) {
    currentValue = currentValue[currentProperty];
    currentProperty = propertyPath.splice(0, 1)[0];
  }

  return currentValue;
}
536928
def field(name, **options)
      name = name.to_sym
      definitions[name] = options
      proxy.instance_eval do
        define_method(name) { fields[name] }
        define_method("#{name}=") { |value| fields[name] = value }
      end
    end
785929
def get_qualified_name(_object):
    """"""
    module = _object.__module__
    if hasattr(_object, '__name__'):
        _class = _object.__name__

    else:
        _class = _object.__class__.__name__

    return module + '.' + _class