Transformer un objet en chaine
@param {Object} object
@param {Number} tabs
335435
function objectToString(object, tabs) {
            var result = [];
            var keys = Object.keys(object);

            keys.forEach(function (key, keyIndex) {
                var line;
                var formatedKey;

                if (-1 < key.indexOf('@')) {
                    formatedKey = '\'' + key + '\'';
                } else {
                    formatedKey = key;
                }

                if (typeof object[key] === 'object') {
                    if (Array.isArray(object[key])) {
                        var newTabs = (tabs + 1);

                        line = getTabs(tabs) + '' + formatedKey + ': [';

                        object[key].forEach(function (item, itemIndex) {
                            if (typeof item === 'object') {
                                line += "\n" + getTabs(newTabs) + '{';
                                line += "\n" + objectToString(item, (newTabs + 1));
                                line += "\n" + getTabs(newTabs) + '}';
                            } else if (typeof item === 'string') {
                                line += "\n" + getTabs(newTabs) + '\'' + addslashes(item) + '\'';
                            } else if (typeof item === 'boolean') {
                                line += "\n" + getTabs(newTabs) + '' + item;
                            } else if (typeof item === 'number') {
                                line += "\n" + getTabs(newTabs) + '' + item;
                            }

                            if (itemIndex < (object[key].length - 1)) {
                                line += ',';
                            }
                        });

                        line += "\n" + getTabs(tabs) + ']';
                    } else {
                        line = getTabs(tabs) + '' + formatedKey + ': {' + "\n";
                        line += objectToString(object[key], (tabs + 1));
                        line += "\n" + getTabs(tabs) + '}';
                    }
                } else if (typeof object[key] === 'string') {
                    line = getTabs(tabs) + '' + formatedKey + ': \'' + addslashes(object[key]) + '\'';
                } else if (typeof object[key] === 'boolean') {
                    line = getTabs(tabs) + '' + formatedKey + ': ' + object[key];
                } else if (typeof object[key] === 'number') {
                    line = getTabs(tabs) + '' + formatedKey + ': ' + object[key];
                }

                if (keyIndex < (keys.length - 1)) {
                    line += ',';
                }

                result.push(line);
            });

            return result.join("\n");
        }
952940
function transformCss (cssText, transform) {
  let node = parseCss(cssText)

  if (typeof transform === 'function') {
    node = transformNode(node, transform)
  }

  return toCssText(node)
}
1059216
function mutator (Glide, Components, Events) {
  /**
   * Merge instance transformers with collection of default transformers.
   * It's important that the Rtl component be last on the list,
   * so it reflects all previous transformations.
   *
   * @type {Array}
   */
  var TRANSFORMERS = [Gap, Grow, Peeking, Focusing].concat(Glide._t, [Rtl]);

  return {
    /**
     * Piplines translate value with registered transformers.
     *
     * @param  {Number} translate
     * @return {Number}
     */
    mutate: function mutate(translate) {
      for (var i = 0; i < TRANSFORMERS.length; i++) {
        var transformer = TRANSFORMERS[i];

        if (isFunction(transformer) && isFunction(transformer().modify)) {
          translate = transformer(Glide, Components, Events).modify(translate);
        } else {
          warn('Transformer should be a function that returns an object with `modify()` method');
        }
      }

      return translate;
    }
  };
}
838434
function processTabs(code, tabSize)
    {
        var tab = '';

        for (var i = 0; i < tabSize; i++)
            tab += ' ';

        return code.replace(/\t/g, tab);
    }
573698
function template(fn, $str, $object) {'use strict';
  // reset cache every 32M
  if (33554432 < template.$) {
    template._ = {};
    template.$ = 0;
  }
  var
    hasTransformer = typeof fn === 'function',
    str = hasTransformer ? $str : fn,
    object = hasTransformer ? $object : $str,
    _ = template._,
    known = _.hasOwnProperty(str),
    parsed = known ? _[str] : (_[str] = template.parse(str)),
    chunks = parsed.chunks,
    values = parsed.values,
    strings
  ;
  // add str length only if not known
  if (!known)
    template.$ += str.length;
  if (hasTransformer) {
    str = 'function' + (Math.random() * 1e5 | 0);
    strings = [
      str,
      'with(this)return ' + str + '([' + chunks + ']' + (
        values.length ? (',' + values.join(',')) : ''
      ) + ')'
    ];
  } else {
    strings = chunks.slice(0, 1);
    for (var i = 1, length = chunks.length; i < length; i++)
      strings.push(values[i - 1], chunks[i]);
    strings = ['with(this)return ' + strings.join('+')];
  }
  return Function.apply(null, strings).apply(
    object,
    hasTransformer ? [fn] : []
  );
}
1350323
def get_tabs(self, model_alias, object):
        
        model_alias = self.get_model_alias(model_alias)
        for item in self.tabs[model_alias]:
            if item.display_filter(object):
                yield item
789427
function(object) {
    var output = "^(",
      units = object.unit,
      gap = object.gap,
      endReg = object.endReg,
      addon = object.addon;
    output += units.map(function(value, index) {
      if (index % 2 !== 0) {
        return;
      }
      return value + "|";
    }).join("");
    output += ")" + gap + endReg;
    return new RegExp(output);
  }
631944
function reformat(object) {
  if (typeof object !== 'object') return object;

  var entries = [];
  var entry;

  for (var key in object) {
    entry = reformat(object[key]);
    if (typeof entry === 'string') {
      entry.label = key;
      entries.push(entry);
    } else {
      entry = { nodes: entry, label: key };
      entries.push(entry);
    }
  }

  return entries;
}
1172506
def _replace_tabs(s, ts=8):
    
    result = ''
    for c in s:
        if c == '\t':
            while True:
                result += ' '
                if len(result) % ts == 0:
                    break
        else:
            result += c
    return result
451334
function objectEach(obj, fn, thisObj) {
  var keys = Object.keys(obj).sort(function (a,b) {
    a = a.toLowerCase()
    b = b.toLowerCase()
    return a === b ? 0 : a < b ? -1 : 1
  })
  for (var i = 0, l = keys.length; i < l; i++) {
    var key = keys[i]
    fn.call(thisObj, obj[key], key, obj)
  }
}
397066
function trapTabs(parentElement) {
		if (parentElement.tabTrapInstalled)
			return;
		
		parentElement.addEventListener("keydown", function (e) { //$NON-NLS-0$
			if(e.keyCode === KEY.TAB) {
				var first = firstTabbable(parentElement);
				var last = lastTabbable(parentElement);
				
				if (first && last) {
					if (e.target === last && !e.shiftKey) {
						// wrap to first tabbable
						first.focus();
						stop(e);
					}
					else if (e.target === first && e.shiftKey) {
						// wrap to last tabbable
						last.focus();
						stop(e);
					}
				}
			} 
		}, true);
		parentElement.tabTrapInstalled = true;
	}
1010957
function appendTransform(defaults, transform) {
    defaults = angular.isArray(defaults) ? defaults : [defaults];
    return (transform) ? defaults.concat(transform) : defaults;
  }
525222
function determineTabs(line, tab){

  let tabs = '';
  for (let i = 0; i < line.depth; i++) {
    tabs += tab;
  }

  return tabs;
}
161010
function transform(transformerCtx, options) {
    var html = options.template;
    for (var i = 0; i < transformers.length; i++) {
        html = transformers[i](html, transformerCtx, options);
    }
    return html;
}
28930
function getTransformer(name, clientPlugin, pluginOptions) {

    // if in cache, just return it
    if (cache[name]) { return cache[name]; }

    var transformers = clientPlugin.transformers;
    var templateDir = clientPlugin.templateDir;

    // if no transformer, throw error
    if (!transformers[name]) { throw new Error('No transformer called ' + name); }

    // generate all the transformers
    _.each(transformers, function (transformer, transformerName) {
        cache[transformerName] = generateTransformer(transformerName, transformer, templateDir, pluginOptions);
    });

    // return the specific one that was requested
    return cache[name];
}
544527
function objectMap (obj, iterate, context) {
  var result = {}
  if (obj) {
    if (iterate) {
      context = context || this
      if (!isFunction(iterate)) {
        iterate = property(iterate)
      }
      each(obj, function (val, index) {
        result[index] = iterate.call(context, val, index, obj)
      })
    } else {
      return obj
    }
  }
  return result
}
446491
function transform( node ) {
	var out;

	out = {
		'name': node.name,
		'description': node.description || '',
		'access': node.access || '',
		'virtual': !!node.virtual
	};
	if ( node.returns ) {
		out.returns = transformReturns( node.returns );
	}
	if ( node.examples ) {
		out.examples = transformExamples( node.examples );
	} else {
		out.examples = [];
	}
	if ( node.params ) {
		out.parameters = transformParams( node.params );
	} else {
		out.parameters = [];
	}
	return out;
}