WIP - add extractor, generate snippet_data
This commit is contained in:
10
node_modules/trim-lines/index.js
generated
vendored
Normal file
10
node_modules/trim-lines/index.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = trimLines
|
||||
|
||||
var ws = /[ \t]*\n+[ \t]*/g
|
||||
var newline = '\n'
|
||||
|
||||
function trimLines(value) {
|
||||
return String(value).replace(ws, newline)
|
||||
}
|
||||
22
node_modules/trim-lines/license
generated
vendored
Normal file
22
node_modules/trim-lines/license
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <mailto:tituswormer@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
107
node_modules/trim-lines/package.json
generated
vendored
Normal file
107
node_modules/trim-lines/package.json
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
{
|
||||
"_from": "trim-lines@^1.0.0",
|
||||
"_id": "trim-lines@1.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-3GOuyNeTqk3FAqc3jOJtw7FTjYl94XBR5aD9QnDbK/T4CA9sW/J0l9RoaRPE9wyPP7NF331qnHnvJFBJ+IDkmQ==",
|
||||
"_location": "/trim-lines",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "trim-lines@^1.0.0",
|
||||
"name": "trim-lines",
|
||||
"escapedName": "trim-lines",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/mdast-util-to-hast"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-1.1.2.tgz",
|
||||
"_shasum": "c8adbdbdae21bb5c2766240a661f693afe23e59b",
|
||||
"_spec": "trim-lines@^1.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/mdast-util-to-hast",
|
||||
"author": {
|
||||
"name": "Titus Wormer",
|
||||
"email": "tituswormer@gmail.com",
|
||||
"url": "https://wooorm.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/wooorm/trim-lines/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Titus Wormer",
|
||||
"email": "tituswormer@gmail.com",
|
||||
"url": "https://wooorm.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Remove spaces and tabs around line-breaks",
|
||||
"devDependencies": {
|
||||
"browserify": "^16.0.0",
|
||||
"nyc": "^14.0.0",
|
||||
"prettier": "^1.12.0",
|
||||
"remark-cli": "^6.0.0",
|
||||
"remark-preset-wooorm": "^4.0.0",
|
||||
"tape": "^4.6.3",
|
||||
"tinyify": "^2.5.0",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/wooorm/trim-lines#readme",
|
||||
"keywords": [
|
||||
"space",
|
||||
"tab",
|
||||
"line",
|
||||
"break",
|
||||
"trim"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "trim-lines",
|
||||
"nyc": {
|
||||
"check-coverage": true,
|
||||
"lines": 100,
|
||||
"functions": 100,
|
||||
"branches": 100
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/wooorm/trim-lines.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build-bundle && npm run build-mangle",
|
||||
"build-bundle": "browserify . -s trim-lines -o trim-lines.js",
|
||||
"build-mangle": "browserify . -s trim-lines -p tinyify -o trim-lines.min.js",
|
||||
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
|
||||
"test": "npm run format && npm run build && npm run test-coverage",
|
||||
"test-api": "node test",
|
||||
"test-coverage": "nyc --reporter lcov tape test.js"
|
||||
},
|
||||
"version": "1.1.2",
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"esnext": false,
|
||||
"ignore": [
|
||||
"trim-lines.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
60
node_modules/trim-lines/readme.md
generated
vendored
Normal file
60
node_modules/trim-lines/readme.md
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
# trim-lines
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
Remove spaces and tabs around line-breaks.
|
||||
|
||||
## Installation
|
||||
|
||||
[npm][]:
|
||||
|
||||
```bash
|
||||
npm install trim-lines
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var trimLines = require('trim-lines')
|
||||
|
||||
trimLines(' foo\t\n\n bar \n\tbaz ') // => ' foo\nbar\nbaz '
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `trimLines(value)`
|
||||
|
||||
Remove initial and final spaces and tabs at the line breaks in `value`
|
||||
(`string`). Does not trim initial and final spaces and tabs of the value
|
||||
itself. Returns the trimmed value.
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://img.shields.io/travis/wooorm/trim-lines.svg
|
||||
|
||||
[build]: https://travis-ci.org/wooorm/trim-lines
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/trim-lines.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/trim-lines
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/trim-lines.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/trim-lines
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/trim-lines.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=trim-lines
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
Reference in New Issue
Block a user