Comparing version 0.1.0 to 0.1.1
{ | ||
"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" | ||
] | ||
} |
@@ -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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7515
128