C# Класс DouglasCrockford.JsMin.JsMinifier

The JavaScript Minifier
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Minify ( string content ) : String

Removes a comments and unnecessary whitespace from JavaScript code

Приватные методы

Метод Описание
Action ( int d ) : void

Do something! What you do is determined by the argument: 1 - Output A. Copy B to A. Get the next B. 2 - Copy B to A. Get the next B. (Delete A). 3 - Get the next B. (Delete B). Action treats a string as a single character. Wow! Action recognizes a regular expression if it is preceded by ( or , or =.

Get ( ) : int

Returns a next character from input stream. Watch out for lookahead. If the character is a control character, translate it to a space or linefeed.

InnerMinify ( ) : void

Copies a input to the output, deleting the characters which are insignificant to JavaScript. Comments will be removed. Tabs will be replaced with spaces. Carriage returns will be replaced with linefeeds. Most spaces and linefeeds will be removed.

IsAlphanum ( int c ) : bool

Returns a true if the character is a letter, digit, underscore, dollar sign, or non-ASCII character

Next ( ) : int

Gets a next character, excluding comments. Peek() is used to see if a '/' is followed by a '/' or '*'.

Peek ( ) : int

Gets a next character without getting it

Put ( int c ) : void

Puts a character to output stream

Описание методов

Minify() публичный Метод

Removes a comments and unnecessary whitespace from JavaScript code
public Minify ( string content ) : String
content string JavaScript content
Результат String