Socket
Book a DemoInstallSign in
Socket

@leaflink/utils

Package Overview
Dependencies
Maintainers
7
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leaflink/utils

Common utilities across LeafLink JavaScript projects

2.0.0
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
7
Weekly downloads
 
Created
Source

Utilities

A common utility library for usage across LeafLink's JavaScript applications.

Installation

npm i @leaflink/utils

Usage

Import the util(s) you need, and go.

import { obfuscateText } from '@leaflink/utils';

or

import obfuscateText from '@leaflink/utils/obfuscateText';

Adding a new utility

  • Add the utility to src.

  • Export from src/index.ts (along with any types).

export { obfuscateText, ObfuscateTextOptions } from './obfuscateText.js';
  • To display the new utility in the Vitepress docs, add it to the entryPoints list in typedoc.json.

Up and running

  • npm run docs to start a local dev server
  • npm run docs:build to build for production
  • npm run docs:preview to locally preview the production build

Testing

To run tests, there's multiple npm scripts available to you:

  • npm run test - Run all tests in watch mode.
  • npm run test <file> - Run matching spec file(s) quickly and watch for changes.

Peer dependencies

Peer dependencies are specific dependencies that a package requires to work correctly, but expects the consumer of the package to provide. In other words, they are dependencies that the package relies on, but are not bundled with the package itself.

@leaflink/utils does not yet require peer deps at this time. This may change if a util has to lean on a dependency like lodash-es.

These peer dependencies will need to be installed separately by the consumer of the package, ensuring that the correct versions are used to maintain compatibility and avoid conflicts with other dependencies in the project.

Contributing

This library provides functions that help other developers while also promoting consistency and modularity across TypeScript projects. If there's a utility you'd like to add that solves a common problem or captures a pattern other projects would benefit from, it sounds like a great fit! If it's moreso tied to the specifics of a single domain, it should likely remain downstream.

IMPORTANT: Please be mindful not to include any sensitive information that could be exposed through the public-facing Vitepress docs.

Config

These docs are generated using typedoc, converted to markdown with typedoc-plugin-markdown, and then tailored for vitepress via typedoc-vitepress-theme.

typedoc.json notes:

  • index.md is currently sourced from README.md
  • individual utility pages are auto-generated based on the entryPoints defined in
  • docsRoot (typedoc-vitepress-theme) matches out to correctly link to the generated pages.

Note: The options present in typedoc.json are a combination of configurations for typedoc-plugin-markdown, typedoc-vitepress-theme, and core typedoc options.

FAQs

Package last updated on 27 Mar 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.