Skip to content

Getting Started โ€‹

Welcome to Outilx documentation!

What is Outilx? โ€‹

Outilx is a modern, modular utility library collection for JavaScript/TypeScript development. It provides high-quality, well-tested utilities across different environments and frameworks.

Current Packages:

Features โ€‹

  • ๐ŸŽฏ Modular - Install only what you need
  • ๐Ÿ“ฆ Tree-shakeable - Optimized bundle sizes
  • ๐Ÿ”ท TypeScript - Full type definitions included
  • โšก Modern - Built with latest JavaScript features
  • ๐Ÿงช Tested - Comprehensive test coverage

Quick Start โ€‹

Choose the package that fits your environment:

bash
npm install @outilx/core
bash
npm install @outilx/browser
bash
npm install @outilx/node
bash
npm install @outilx/react-hooks
bash
npm install @outilx/ai

Then import and use:

typescript
import { toArray, TipCache, getUrlParams, parseJsonWithFallback } from '@outilx/core';

const arr = toArray(1); // [1]
const cache = new TipCache(5000);
const params = getUrlParams('foo=bar');
typescript
import { toArray, TipCache, getUrlParams, getNetWorkInfo, LocalStorageCache } from '@outilx/browser';

const arr = toArray(1); // [1]
const cache = new TipCache({ ttl: 5000 });
const networkInfo = getNetWorkInfo();
typescript
import { ensureDirExists, deleteEmptyDirs } from '@outilx/node';

await ensureDirExists('./my-dir');
await deleteEmptyDirs('./my-dir');
typescript
import { useBoolean, useCounter } from '@outilx/react-hooks';

function App() {
  const [visible, { toggle }] = useBoolean(false);
  const [count, { inc }] = useCounter(0);
  return <div>...</div>;
}
typescript
import { detectCodeBlocks, useStreamingSimulator } from '@outilx/ai';

const blocks = detectCodeBlocks(markdownText);
const { content, startStreaming } = useStreamingSimulator({
  chunks: ['Hello', ' ', 'World'],
  interval: 100
});

Next Steps โ€‹