Skip to content

Nehonix-Team/StruLink

StruLink

DEPRECATION NOTICE

NehonixURIProcessor will be deprecated in December 2025.

StruLink is the official successor. It is a simplified, refocused version featuring:

  • Pure URL/URI and String encoding, decoding, and validation utilities.
  • A minimal footprint (only 1 runtime dependency).
  • Note: AI/ML features, Python microservices, and framework integrations have been removed.

Migration Plan: If your project relies on Express/React integrations or machine learning features, continue using nehonix/nehonixUriProcessor until December 2025. For pure utility usage, migrate to StruLink.


StruLink is a focused TypeScript library for URL/URI and string encoding, decoding, validation, and parsing. It is designed for developers who require high-performance URL manipulation utilities without the overhead of framework dependencies.

npm version License: MIT

Quick Start

Installation

Recommended for TypeScript projects:

xfpm install strulink

Alternative methods:

npm install strulink
# or
bun add strulink
# or
yarn add strulink

Basic Usage

import { StruLink as __strl__ } from "strulink";

// Validate and decode URL
const result = await __strl__.asyncCheckUrl(
  "https://example.com?data=SGVsbG8=",
);
console.log(result.isValid); // true

// Auto-detect and decode
const decoded = __strl__.autoDetectAndDecode(
  "https://example.com?data=SGVsbG8gV29ybGQ=",
);
console.log(decoded); // https://example.com?data=Hello World

// Detect malicious patterns
const analysis = __strl__.detectMaliciousPatterns(
  "https://example.com?user=admin' OR '1'='1",
);
console.log(analysis.isMalicious); // true

Features

  • URL Validation: Validate URIs against customizable rules.
  • Auto-Detection & Decoding: Decode complex URI parameter encodings automatically.
  • Multiple Encodings Supported: Base64, percent encoding, hex, punycode, JWT, and more.
  • Security Analysis: Detect SQL injection, XSS, and path traversal patterns.
  • Internationalized URIs: Complete punycode support.
  • Lightweight Architecture: Single runtime dependency.
  • Zero Configuration: Ready for use without additional setup.

Supported Encoding Types

percentEncodingbase64hexunicodehtmlEntitypunycodeasciihexasciioctrot13base32urlSafeBase64jsEscapecssEscapeutf7quotedPrintablejwt • and more

Documentation

Complete Documentation - Main index for comprehensive API references and developer guides.

Guide References

Core API Reference

// Validation
__strl__.checkUrl(url, options);
__strl__.asyncCheckUrl(url, options);
__strl__.isValidUri(url, options);

// Encoding and Decoding
__strl__.encode(input, encodingType);
__strl__.decode(input, encodingType);
__strl__.autoDetectAndDecode(input);
__strl__.detectEncoding(input);

// Security Analysis
__strl__.detectMaliciousPatterns(input, options);
__strl__.scanUrl(url);
__strl__.sanitizeInput(input);

// General Analysis
__strl__.analyzeURL(url);
__strl__.needsDeepScan(input);

Contribution Guidelines

Contributions to the project are welcome. Please refer to our Contributing Guide prior to submitting pull requests.

License

MIT Copyright (c) Nehonix Team

Key Links

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors