Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@wordpress/autop

Package Overview
Dependencies
Maintainers
1
Versions
234
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.0.0
Version published
Weekly downloads
140K
-8.92%
Maintainers
1
Weekly downloads
 
Created
Source

@wordpress/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
  • remove( text: string ): string

FAQs

Package last updated on 04 Jan 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