
Research
TeamPCP Compromises Telnyx Python SDK to Deliver Credential-Stealing Malware
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.
@blofin/helper
Advanced tools
A TypeScript utility library with modular architecture.
pnpm add @blofin/helper
# or
npm install @blofin/helper
# or
yarn add @blofin/helper
Calculation module using bignumber.js
import { add, subtract, multiply, divide, num } from '@blofin/helper/calc';
add(1, 2); // '3'
add(1, 2, 3, 4); // '10'
subtract(5, 3); // '2'
multiply(2, 3, 4); // '24'
divide(10, 2); // '5'
num('123.456'); // BigNumber instance
Formatting utilities
import {
formatNumber,
displayNumber,
useCurrency,
usePercent,
compositeDisplayNumber,
withCurrency,
withThousand
} from '@blofin/helper/format';
// Core number formatting (returns number)
formatNumber(123.456, 2); // 123.46
// Display formatting (returns string)
displayNumber(1234.56, { currency: { symbol: '$' }, thousands: { enabled: true } });
// '$1,234.56'
// Quick entry functions
useCurrency(1234.56, '$'); // '$1,234.56'
usePercent(0.1234); // '12.34%'
// Composite display with function composition
compositeDisplayNumber(1123.133, useCurrency, withThousand());
// '$1,123.13'
LocalStorage and SessionStorage utilities
import {
getLocalStorage,
setLocalStorage,
removeLocalStorage,
getSessionStorage,
setSessionStorage
} from '@blofin/helper/storage';
setLocalStorage('key', 'value');
const value = getLocalStorage('key'); // 'value'
removeLocalStorage('key');
setSessionStorage('sessionKey', 'sessionValue');
const sessionValue = getSessionStorage('sessionKey');
General utility functions
import { isEmpty, deepClone } from '@blofin/helper/utils';
isEmpty(null); // true
isEmpty(''); // true
isEmpty([]); // true
isEmpty({}); // true
deepClone({ a: 1, b: { c: 2 } }); // { a: 1, b: { c: 2 } }
Functional programming utilities
import { compose, pipe, curry, memoize, awaitEither } from '@blofin/helper/fp';
// Compose functions (right to left)
const add = (x: number) => x + 1;
const multiply = (x: number) => x * 2;
const composed = compose(multiply, add);
composed(5); // 12 (5+1 then *2)
// Pipe functions (left to right)
const piped = pipe(add, multiply);
piped(5); // 12 (5+1 then *2)
// Curry
const addCurried = curry((a: number, b: number) => a + b);
addCurried(1)(2); // 3
// Memoize
const expensiveFn = memoize((n: number) => n * n);
expensiveFn(5); // 25 (computed)
expensiveFn(5); // 25 (cached)
UI components (React)
import { Countdown } from '@blofin/helper/ui';
<Countdown target={Date.now() + 60000} />
import * as helper from '@blofin/helper';
helper.calc.add(1, 2); // '3'
helper.format.displayNumber(1234.56, { currency: { symbol: '$' } }); // '$1,234.56'
helper.utils.isEmpty(null); // true
helper.storage.setLocalStorage('key', 'value');
import { add, multiply } from '@blofin/helper/calc';
import { displayNumber, useCurrency } from '@blofin/helper/format';
import { isEmpty, deepClone } from '@blofin/helper/utils';
import { compose, pipe } from '@blofin/helper/fp';
This approach enables tree-shaking, so only the imported modules will be bundled.
pnpm install
pnpm run build
pnpm test
pnpm run test:watch
pnpm run test:coverage
pnpm run storybook
Visit http://localhost:6006 to view the documentation.
pnpm run build-storybook
blofin-helper/
├── src/
│ ├── calc/ # Calculation module
│ ├── format/ # Formatting module
│ ├── storage/ # Storage module
│ ├── utils/ # Utility functions
│ ├── fp/ # Functional programming
│ ├── ui/ # UI components
│ └── index.ts # Main entry point
├── tests/ # Test files
├── stories/ # Storybook stories
├── dist/ # Build output
└── .storybook/ # Storybook configuration
MIT
FAQs
A TypeScript utility library with modular architecture
The npm package @blofin/helper receives a total of 1 weekly downloads. As such, @blofin/helper popularity was classified as not popular.
We found that @blofin/helper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.

Security News
/Research
Widespread GitHub phishing campaign uses fake Visual Studio Code security alerts in Discussions to trick developers into visiting malicious website.