Dump object

 @param [Formatter] formatter

 @return [undefined]

 @api private
165372
def dump(formatter)
      formatter.name(self)
      formatter.attribute(:input, input)
      if successful?
        formatter.attribute(:output, output)
      else
        formatter.nest(:error, output)
      end
      formatter.nest(:context, context)
    end
562617
function( name ) {
		if ( ! munit.isString( name ) || ! name.length ) {
			throw new Error( "Name not found for removing formatter" );
		}

		if ( render._formatHash[ name ] ) {
			delete render._formatHash[ name ];
			render._formats = render._formats.filter(function( f ) {
				return f.name !== name;
			});
		}
	}
1065812
def dump_ast(ast, indent=' ', newline='\n'):
    '''
    
    
    
    '''
    
    visitor = ASTPrinter(indent=indent, level=0, newline=newline)
    visitor.visit(ast)
    return visitor.dumps()
512569
def marshal_dump
      h = to_h
      if h[:attributes]
        h[:attributes] = h[:attributes].clone
        h[:attributes].instance_variable_set(:@client, nil)
      end

      if h[:original_object]
        h[:original_object] = h[:original_object].clone
        h[:original_object].instance_variable_set(:@client, nil)

        if h[:original_object]['attributes']
          h[:original_object]['attributes'] = h[:original_object]['attributes'].clone
          h[:original_object]['attributes'].instance_variable_set(:@client, nil)
        end
      end
      h
    end
837822
def dumps(self, value):
    ''''''
    for serializer in self:
      value = serializer.dumps(value)
    return value
982715
def dump(node):
    
    def _format(node):
        if isinstance(node, AST):
            return '%s(%s)' % (node.__class__.__name__,
                               ', '.join('%s=%s' % (a, _format(b))
                                         for a, b in iter_fields(node)))
        elif isinstance(node, list):
            return '[%s]' % ', '.join(_format(x) for x in node)
        return repr(node)
    if not isinstance(node, AST):
        raise TypeError('expected AST, got %r' % node.__class__.__name__)
    return _format(node)
975336
def _formatter_class(name, value):
    
    __mname = value.__module__
    if __mname != '__main__':
        return "%s = <type '%s.%s'>" % (name, __mname, value.__name__)
    else:
        return "%s = <type '%s'>" % (name, value.__name__)
331023
def format(self, formatter, *args, **kwargs):
        
        # TODO: data export?
        return self.get_formatter(formatter)(*args, **kwargs)
1080098
def json_formatter(obj):
    
    if isinstance(obj, str):
        # Make a list of size 1
        return json.dumps([obj], indent=True)
    else:
        return json.dumps(obj, indent=True, sort_keys=True)
977757
def dumps(value):
    

    from contoml.file.file import TOMLFile

    if not isinstance(value, TOMLFile):
        raise RuntimeError("Can only dump a TOMLFile instance loaded by load() or loads()")

    return value.dumps()
367907
function (formatter) {
    this.formatter = formatter;

    /**
     * Convert 
     *
     * @param filePath input ods file path
     */
    this.convert = function (filePath) {
        log('Message resource converter');
        log('Execute convert: ' + filePath);

        var excelApp = new ActiveXObject('Excel.Application');
        excelApp.Visible = true;
        log('Start');
        var book = excelApp.Workbooks.Open(filePath);
        var sheet = book.Worksheets(1);
        this.extractResources(sheet);
        log("End");
        book.Close(false);
        excelApp.Quit();
        excelApp = null;
    };

    this.data = [];
    this.fillData = function (sheet, lastCol, lastRow) {
      WScript.StdOut.Write('                        \r');
      this.data.push(undefined);
      for (var r = 1; r <= lastRow; r++) {
        var row = [];
        row.push(undefined);
        for (var c = 1; c <= lastCol; c++) {
          row.push(sheet.Cells(r, c).Value);
        }
        this.data.push(row);
        WScript.StdOut.Write('\rLoading... ' + r + ' / ' + lastRow);
      }
      WScript.StdOut.WriteLine();
    };
    this.value = function (row, col) {
        if (row >= this.data.length) throw Error('Array index out of range error(row): ' + row + ' in ' + this.data.length);
        if (col >= this.data[row].length) throw Error('Array index out of range error(col): ' + col + ' in ' + this.data[row].length);
        return this.data[row][col];
    };
    this.getLocaleColIndex = function(locale) {
        for (var col = 1; col < 100; col++) {
            if (this.value(3, col).toLowerCase() === locale.toLowerCase()) {
                return col;
            }
        }
        throw new Error('ref locale "' + locale + '" not found');
    };
    this.getRealValue = function (row, col) {
        var v = this.value(row, col);
        if (v === '^') {
            return this.getRealValue(row, col - 1);
        } else if (v === undefined) {
            return '';
        } else if (v.length > 1 && v.charAt(0) === '^') {
            var m = v.match(/^\^([a-z]+[\-_][a-zA-Z]+)$/);
            if (m) {
                var refLocaleCol = this.getLocaleColIndex(m[1]);
                return this.getRealValue(row, refLocaleCol);
            }
        }
        return v;
    };
    this.extractResources = function (sheet) {
        var locales = [];
        var lastLocaleCol = 1;
        var startLocaleCol = 4;
        for (var col = startLocaleCol, cellValue; cellValue = sheet.Cells(3, col).Value; col++) {
            lastLocaleCol = col;
        }
        var lastKeyRow = this.getLastKeyRow(sheet, 5);
        this.fillData(sheet, lastLocaleCol, lastKeyRow);
        console.log('Writing files...');
        var locales = [];
        for (var col = startLocaleCol; col <= lastLocaleCol; col++) {
            var localeKey = this.value(3, col);
            var lines = [];
            for (var row = 4; row <= lastKeyRow; row++) {
                var key = this.value(row, 3);
                var v = this.getRealValue(row, col);
                if (key) {
                    if (key.substr(0, 1) === '#') {
                        lines.push(formatter.formatComment(key));
                    } else {
                        if (row === lastKeyRow) {
                            lines.push(formatter.formatLastLine(key, v));
                        } else {
                            lines.push(formatter.formatLine(key, v));
                        }
                    }
                } else {
                    lines.push(''); // empty line
                }
            }
            locales.push(localeKey);
            this.writeSingleResourceFile(localeKey, formatter.normalizeLines(lines));
        }
        console.log('Wrote ' + locales.length + ' files in messages/ directory.');
    };
    this.writeSingleResourceFile = function (localeKey, lines) {
        var folderName = formatter.folderName;
        if (!fso.FolderExists(folderName)) {
            fso.CreateFolder(folderName);
        }
        // const
        var adTypeBinary = 1; // Binary
        var adTypeText = 2; // Text
        var adWriteChar = 0; // no EOL
        var adSaveCreateOverWrite = 2; // create or over write

        var filename = formatter.getFilePath(folderName, localeKey);
        var sw = new ActiveXObject('ADODB.Stream');
        sw.Type = adTypeText;
        sw.charset = 'utf-8';
        sw.Open();
        var headerText = formatter.formatHeader(localeKey);
        sw.WriteText(headerText, adWriteChar);
        for (var i = 0; i < lines.length; i++) {
            sw.WriteText(lines[i], adWriteChar);
        }
        var footerText = formatter.formatFooter(localeKey);
        sw.WriteText(footerText, adWriteChar);
        // Change to binary mode
        sw.Position = 0;
        sw.Type = adTypeBinary;
        // UTF-8 BOM
        if (outputBOM) {
            // Keep UTF-8 BOM
            sw.Position = 0;
        } else {
            // Skip UTF-8 BOM
            sw.Position = 3;
        }
        var binBlock = sw.Read();
        sw.Close();

        // Write binBlock as binary
        var os = new ActiveXObject('ADODB.Stream');
        os.Type = adTypeBinary;
        os.Open();
        os.Write(binBlock);
        os.SaveToFile(filename, adSaveCreateOverWrite);
        if (formatter.requireDefaultFile && formatter.isDefaultLocale(localeKey)) {
            var filenameOriginal = formatter.getDefaultFilePath(folderName);
            os.SaveToFile(filenameOriginal, adSaveCreateOverWrite);
        }
        os.Close();
    };

    // True if there are 
    this.getLastKeyRow = function (sheet, startRow) {
        var isBlank10rows = function (row) {
            for (var i = 0; i < 10; i++) {
                if (sheet.Cells(row + i, 3).Value) {
                    return false;
                }
            }
            return true;
        };
        for (var j = startRow; j < 5000; j++) { 
            if (isBlank10rows(j)) {
                return j - 1;
            }
        }
        return startRow;
    };
    return this;
}
694249
function formatter (options) {
  const line = [
    new Date().toISOString(),
    options.level
  ]

  if (options.message !== undefined) line.push(options.message)

  if (options.meta && Object.keys(options.meta).length) line.push(JSON.stringify(options.meta))

  return line.join(' ')
}
193896
def dumps(cls, value):
    ''''''
    if not hasattr(value, '__getitem__') or not hasattr(value, 'iteritems'):
      value = {cls.sentinel: value}
    return value
1156956
function formatter (fail) {
      return fail.map(function oops (err) {
        return {
            line: err.line
          , column: err.character
          , message: err.reason
          , ref: err
        };
      });
    }
336177
def format(f = nil)
      if f.nil?
        default_options[:format]
      else
        parser(Parser) if parser.nil?
        default_options[:format] = f
        validate_format
      end
    end
667129
def dump(obj, root_file, proto=0, key=None):
    
    if isinstance(root_file, string_types):
        root_file = root_open(root_file, 'recreate')
        own_file = True
    else:
        own_file = False
    ret = Pickler(root_file, proto).dump(obj, key)
    if own_file:
        root_file.Close()
    return ret
550507
def dump(self, sender=None, **kwargs):
        '''
        '''
        if sender is None:
            if self._sender is None:
                sender = _default_bounce_dump
            else:
                sender = BounceDump(api_key=self._sender.api_key,
                                    test=self._sender.test,
                                    secure=self._sender.secure)
        return sender.get(self.id, **kwargs)