🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@wordpress/autop

Package Overview
Dependencies
Maintainers
6
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/autop

WordPress's automatic paragraph functions `autop` and `removep`.

Source
npmnpm
Version
1.1.3
Version published
Weekly downloads
108K
9.3%
Maintainers
6
Weekly downloads
 
Created
Source

Autop

JavaScript port of WordPress's automatic paragraph function autop and the removep reverse behavior.

Installation

Install the module

npm install @wordpress/autop --save

Usage

Import the desired function(s) from @wordpress/autop:

import { autop, removep } from '@wordpress/autop';

autop( 'my text' );
// "<p>my text</p>"

removep( '<p>my text</p>' );
// "my text"

API Usage

  • autop( text: string ): string
  • removep( text: string ): string



Code is Poetry.

Keywords

wordpress

FAQs

Package last updated on 09 Aug 2018

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