JavaScript::Beautifier man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

JavaScript::BeautifierUser Contributed Perl DocumentaJavaScript::Beautifier(3)

NAME
       JavaScript::Beautifier - Beautify Javascript (beautifier for
       javascript)

SYNOPSIS
	   use JavaScript::Beautifier qw/js_beautify/;

	   my $pretty_js = js_beautify( $js_source_code, {
	       indent_size => 4,
	       indent_character => ' ',
	   } );

DESCRIPTION
       This module is mostly a Perl-rewrite of
       http://github.com/einars/js-beautify/tree/master/beautify.js
       <http://github.com/einars/js-beautify/tree/master/beautify.js>

       You can check it through <http://jsbeautifier.org/>

FUNCTIONS
   js_beautify( $js_source_code, $opts );
       beautify javascript.

       options

       indent_size
       indent_character
	   if you prefer Tab than Space, try:

	       {
		   indent_size => 1,
		   indent_character => "\t",
	       }

       preserve_newlines
	   default is 1

	       my $in = "var\na=dont_preserve_newlines";
	       my $out = "var a = dont_preserve_newlines";
	       my $js = js_beautify( $in, { preserve_newlines => 0 } );
	       # $out eq $js
	       $in = "var\na=do_preserve_newlines";
	       $out = "var\na = do_preserve_newlines";
	       $js = js_beautify( $in, { preserve_newlines => 1 } );
	       # $out eq $js

       space_after_anon_function
	   default is 0

AUTHOR
       Fayland Lam, "<fayland at gmail.com>"

COPYRIGHT & LICENSE
       Copyright 2008 Fayland Lam, all rights reserved.

       This program is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.14.1			  2011-06-20	     JavaScript::Beautifier(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net