Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

list-item

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

list-item - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

17

package.json
{
"name": "list-item",
"description": "Generate a single formatted list item, allowing you to easily generate lists with proper indentation, bullets, numbers or other leading characters.",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "https://github.com/jonschlinkert/list-item",

@@ -35,3 +35,16 @@ "author": {

},
"keywords": []
"keywords": [
"bullet",
"format",
"item",
"list",
"list-item",
"markdown",
"numbered",
"numerals",
"ordered",
"roman",
"test",
"unordered"
]
}

54

README.md

@@ -17,28 +17,2 @@ # list-item [![NPM version](https://badge.fury.io/js/list-item.svg)](http://badge.fury.io/js/list-item)

## API
### [listitem](index.js#L45)
Returns a function to generate a plain-text/markdown list-item, allowing options to be cached for subsequent calls.
* `options` **{String}**
- `nobullet` **{Boolean}**: Pass true if you only want the list iten and identation, but no bullets.
- `indent` **{String}**: The amount of leading indentation to use. default is ` `.
- `chars` **{String|Array}**: If a string is passed, [expand-range] will be used to generate an array of bullets (visit [expand-range] to see all options.) Or directly pass an array of bullets, numbers, letters or other characters to use for each list item. Default `['-', '*', '+', '~']`
* `fn` **{Function}**: pass a function [expand-range] to modify the bullet for an item as it's generated. See the [examples].
```js
var li = listitem(options);
li(0, 'Level 0 list item');
//=> '- Level 0 list item'
li(1, 'Level 1 list item');
//=> ' * Level 1 list item'
li(2, 'Level 2 list item');
//=> ' + Level 2 list item'
```
## Examples

@@ -100,2 +74,30 @@

## API
### [listitem](index.js#L45)
Returns a function to generate a plain-text/markdown list-item, allowing options to be cached for subsequent calls.
* `options` **{String}**
- `nobullet` **{Boolean}**: Pass true if you only want the list iten and identation, but no bullets.
- `indent` **{String}**: The amount of leading indentation to use. default is ` `.
- `chars` **{String|Array}**: If a string is passed, [expand-range] will be used to generate an array of bullets (visit [expand-range] to see all options.) Or directly pass an array of bullets, numbers, letters or other characters to use for each list item. Default `['-', '*', '+', '~']`
* `fn` **{Function}**: pass a function [expand-range] to modify the bullet for an item as it's generated. See the [examples].
```js
var li = listitem(options);
li(0, 'Level 0 list item');
//=> '- Level 0 list item'
li(1, 'Level 1 list item');
//=> ' * Level 1 list item'
li(2, 'Level 2 list item');
//=> ' + Level 2 list item'
```
## Run tests

@@ -102,0 +104,0 @@ Install dev dependencies.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc