@emdaer/plugin-list
Advanced tools
| const list = require('../src'); | ||
| describe('@emdaer/plugin-list', () => { | ||
| test('generates ordered lists', async () => { | ||
| expect(await list({ type: 'ol', items: ['item1', 'item2'] })).toBe( | ||
| '<ol>\n<li>item1</li>\n<li>item2</li>\n</ol>' | ||
| ); | ||
| }); | ||
| test('generates unordered lists', async () => { | ||
| expect(await list({ type: 'ul', items: ['item1', 'item2'] })).toBe( | ||
| '<ul>\n<li>item1</li>\n<li>item2</li>\n</ul>' | ||
| ); | ||
| }); | ||
| test('generates nestedlists', async () => { | ||
| expect( | ||
| await list({ | ||
| type: 'ul', | ||
| items: [ | ||
| 'item1', | ||
| { | ||
| plugin: 'list', | ||
| options: { type: 'ol', items: ['nested', 'list'] }, | ||
| }, | ||
| 'item3', | ||
| ], | ||
| }) | ||
| ).toBe( | ||
| '<ul>\n<li>item1</li>\n<li><ol>\n<li>nested</li>\n<li>list</li>\n</ol></li>\n<li>item3</li>\n</ul>' | ||
| ); | ||
| }); | ||
| }); |
+3
-7
| { | ||
| "name": "@emdaer/plugin-list", | ||
| "description": "an emdaer plugin to add lists", | ||
| "version": "1.0.0-alpha.13", | ||
| "version": "1.0.0-beta.0", | ||
| "repository": "emdaer/emdaer", | ||
| "homepage": "https://emdaer.github.io/", | ||
| "homepage": "https://emdaer.me/", | ||
| "keywords": [ | ||
@@ -13,8 +13,4 @@ "emdaer-plugin" | ||
| "scripts": { | ||
| "write-docs": "emdaer && git add ./README.md", | ||
| "prepublish": "flow-remove-types -p src -d lib && npm run write-docs" | ||
| "prepublish": "flow-remove-types -p src -i .test.js -d lib" | ||
| }, | ||
| "devDependencies": { | ||
| "flow-remove-types": "1.2.1" | ||
| }, | ||
| "publishConfig": { | ||
@@ -21,0 +17,0 @@ "access": "public" |
| const list = require('../src'); | ||
| describe('@emdaer/plugin-list', () => { | ||
| test('generates ordered lists', async () => { | ||
| expect(await list({ type: 'ol', items: ['item1', 'item2'] })).toBe( | ||
| '<ol>\n<li>item1</li>\n<li>item2</li>\n</ol>' | ||
| ); | ||
| }); | ||
| test('generates unordered lists', async () => { | ||
| expect(await list({ type: 'ul', items: ['item1', 'item2'] })).toBe( | ||
| '<ul>\n<li>item1</li>\n<li>item2</li>\n</ul>' | ||
| ); | ||
| }); | ||
| test('generates nestedlists', async () => { | ||
| expect( | ||
| await list({ | ||
| type: 'ul', | ||
| items: [ | ||
| 'item1', | ||
| { | ||
| plugin: 'list', | ||
| options: { type: 'ol', items: ['nested', 'list'] }, | ||
| }, | ||
| 'item3', | ||
| ], | ||
| }) | ||
| ).toBe( | ||
| '<ul>\n<li>item1</li>\n<li><ol>\n<li>nested</li>\n<li>list</li>\n</ol></li>\n<li>item3</li>\n</ul>' | ||
| ); | ||
| }); | ||
| }); |
-17
| destination: ./README.md | ||
| content: | ||
| - - heading | ||
| - | ||
| level: 1 | ||
| from: | ||
| - value-from-package | ||
| - | ||
| value: name | ||
| - - paragraph | ||
| - | ||
| from: | ||
| - value-from-package | ||
| - | ||
| value: description | ||
| transforms: | ||
| - - smartypants |
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
-100%0
-100%2621
-13.38%5
-16.67%