
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
shell-validator
Advanced tools
Una librería React para validar y procesar imágenes con OCR, pensada para aplicaciones que necesitan subir comprobantes o facturas de tipo shell y extraer texto automáticamente.
npm install shell-validator
Un componente especializado para la carga y validación de facturas, con soporte para OCR (Reconocimiento Óptico de Caracteres).
import { FileUploader } from 'shell-validator';
import 'shell-validator/src/styles/FileUploader.css'; /* importar estilos */
function App() {
return <FileUploader />;
}
Maneja la validación de archivos.
import { useFileValidation } from 'shell-validator';
function MiComponente() {
const { file, preview, errors, handleFile } = useFileValidation();
return (
<div>
<input
type="file"
onChange={(e) => handleFile(e.target.files)}
/>
{preview && <img src={preview} alt="Preview" />}
{errors.length > 0 && (
<div>
{errors.map((error, index) => (
<p key={index}>{error}</p>
))}
</div>
)}
</div>
);
}
Maneja la validación de imágenes y OCR.
import { useImageValidation } from 'shell-validator';
function MiComponente() {
const { validateImageFile, extractedText, error } = useImageValidation();
const procesarImagen = async (file) => {
const esValida = await validateImageFile(file);
if (esValida) {
console.log('Texto extraído:', extractedText);
}
};
return (
<div>
<input
type="file"
onChange={(e) => procesarImagen(e.target.files[0])}
/>
{extractedText && (
<div>
<h3>Texto extraído:</h3>
<pre>{extractedText}</pre>
</div>
)}
</div>
);
}
// Configuración por defecto
const config = {
maxSizeInMB: 1,
allowedTypes: ['image/jpeg', 'image/png'],
allowedExtensions: ['.jpg', '.png', '.jpeg'],
maxFiles: 1,
errorMessages: {
size: 'El archivo excede el tamaño máximo permitido de' MB',
type: 'Solo se permiten archivos JPG, PNG y JPEG',
maxFiles: 'Solo se permite subir un archivo a la vez'
}
};
FAQs
Una librería de componentes React para validación de archivos y OCR
The npm package shell-validator receives a total of 1 weekly downloads. As such, shell-validator popularity was classified as not popular.
We found that shell-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.