New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@gesslar/wrapify

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gesslar/wrapify

A text wrapping script.

latest
Source
npmnpm
Version
1.9.0
Version published
Maintainers
1
Created
Source

@gesslar/wrapify

Lightweight helpers for wrapping multi-paragraph strings with optional hanging indents.

Install

npm install wrapify

Usage

ESM (Node/Deno/Browsers)

import wrapify, {wrapify as wrap, iwrapify} from "wrapify"

const text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
console.log(wrap(text, 50, 2))
console.log(iwrapify(text, 50, 4))

CDN

  • esm.sh: import {wrapify} from "https://esm.sh/@gesslar/wrapify"
  • jsDelivr (ESM): import wrapify from "https://cdn.jsdelivr.net/npm/@gesslar/wrapify/+esm"

API

  • wrapify(text?, maxLineLength = 80, indent = 3) – wraps text with a hanging indent applied to every line.
  • iwrapify(text?, maxLineLength = 80, indent = 4) – wraps text with an indent applied after the first line.

Both helpers normalize blank lines between paragraphs and collapse excessive whitespace. Empty, null, or undefined input returns an empty string.

Keywords

wrap

FAQs

Package last updated on 27 Feb 2026

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