Reusable utility codes for internal SmariTrips projects, bundled with TypeScript types. Version 2.4.29 is the current stable release. It provides common helpers (e.g., date formatting, number parsing) to standardize code across the company. No external dependencies. Unlike broader libraries (lodash, date-fns), it is purpose-built for SM's internal conventions and is not intended for public use. Development is ongoing within the organization, with npm link as the primary install method.
npm install sm-utilityVerified import paths — ran on the pinned version, not inferred.
Shows importing and using `formatDate` and `parseNumber` with custom locale-aware formatting.
Use dynamic import() or configure Node.js to load ESM packages.
Verify expected locale; the package is designed for Brazilian Portuguese.
Replace `toCurrency` calls with `formatCurrency`.
Run `npm link path-to/sm-utils` or install from registry with `npm install sm-utility`.
Replace `require('sm-utility')` with `import('sm-utility')` or use an ESM wrapper.Use named import: `import { formatDate } from 'sm-utility'`.No dependency data recorded yet.