tinyphp-class/jcompressor

Funciones de compresión

1.0 2024-11-16 18:00 UTC

This package is not auto-updated.

Last update: 2024-12-15 16:44:42 UTC


README

Instalación via composer

composer require tinyphp-class/jcompressor

Funciones

/** Compimir HTML de forma sencilla */
JCompressor::html(string $buffer): string

/** Comprimir contenido CSS */
JCompressor::css(string $content, bool $use_toptal = false, int|null $cache_time = null, string|null $cache_key = null): string

/** Comprimir contenido Javascript */
JCompressor::js(string $content, bool $use_toptal = false, int|null $cache_time = null, string|null $cache_key = null): string

/** Comprimir el contenido JSON */
JCompressor::json(string|array $content): string

/** Comprimir el contenido de un archivo CSS */
JCompressor::file_css(string $file, bool $use_toptal = false, int|null $cache_time = null, string|null $cache_key = null): string

/** Comprimir el contenido de un archivo Javascript */
JCompressor::file_js(string $file, bool $use_toptal = false, int|null $cache_time = null, string|null $cache_key = null): string