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

levelify

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

levelify

## Installation

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Levelify

Installation

npm install levelify

Usage

Say you have text and you want to have outline numbering, like:


I. Heading 1
II. Heading 2
Blah blah text here
A. Subheading A
Moar text
B. Subheading b
You get the idea, right?
Cool.

With levelify, you can write the text with levels represented by lower-case Ls (l). So, for example:


l. Heading 1
l. Heading 2
Blah blah text here
ll. Subheading A
Moar text
ll. Subheading b
You get the idea, right?
Cool.

Then to convert this, you simply would take the string, provide this configuration ["$I","$A"], and the magic of levelify will handle it.


var textHere = "l. Heading 1\nl. Heading 2\nBlah blah text here\nll. Subheading A\nMoar text\nll. Subheading b\nYou get the idea, right?\nCool."
console.log(new Levelify(textHere, ["$I.","$A."]).results)

License

CC0

FAQs

Package last updated on 25 Jan 2016

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