WIP - add extractor, generate snippet_data
This commit is contained in:
17
node_modules/trim-trailing-lines/index.js
generated
vendored
Normal file
17
node_modules/trim-trailing-lines/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = trimTrailingLines
|
||||
|
||||
var line = '\n'
|
||||
|
||||
// Remove final newline characters from `value`.
|
||||
function trimTrailingLines(value) {
|
||||
var val = String(value)
|
||||
var index = val.length
|
||||
|
||||
while (val.charAt(--index) === line) {
|
||||
// Empty
|
||||
}
|
||||
|
||||
return val.slice(0, index + 1)
|
||||
}
|
||||
22
node_modules/trim-trailing-lines/license
generated
vendored
Normal file
22
node_modules/trim-trailing-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-trailing-lines/package.json
generated
vendored
Normal file
107
node_modules/trim-trailing-lines/package.json
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
{
|
||||
"_from": "trim-trailing-lines@^1.0.0",
|
||||
"_id": "trim-trailing-lines@1.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-MUjYItdrqqj2zpcHFTkMa9WAv4JHTI6gnRQGPFLrt5L9a6tRMiDnIqYl8JBvu2d2Tc3lWJKQwlGCp0K8AvCM+Q==",
|
||||
"_location": "/trim-trailing-lines",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "trim-trailing-lines@^1.0.0",
|
||||
"name": "trim-trailing-lines",
|
||||
"escapedName": "trim-trailing-lines",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/remark-parse"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz",
|
||||
"_shasum": "d2f1e153161152e9f02fabc670fb40bec2ea2e3a",
|
||||
"_spec": "trim-trailing-lines@^1.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/remark-parse",
|
||||
"author": {
|
||||
"name": "Titus Wormer",
|
||||
"email": "tituswormer@gmail.com",
|
||||
"url": "https://wooorm.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/wooorm/trim-trailing-lines/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Titus Wormer",
|
||||
"email": "tituswormer@gmail.com",
|
||||
"url": "https://wooorm.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Remove final newline characters from a string",
|
||||
"devDependencies": {
|
||||
"browserify": "^16.0.0",
|
||||
"nyc": "^14.0.0",
|
||||
"prettier": "^1.12.1",
|
||||
"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-trailing-lines#readme",
|
||||
"keywords": [
|
||||
"trim",
|
||||
"final",
|
||||
"line",
|
||||
"newline",
|
||||
"characters"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "trim-trailing-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-trailing-lines.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build-bundle && npm run build-mangle",
|
||||
"build-bundle": "browserify . -s trimTrailingLines -o trim-trailing-lines.js",
|
||||
"build-mangle": "browserify . -s trimTrailingLines -p tinyify -o trim-trailing-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,
|
||||
"ignores": [
|
||||
"trim-trailing-lines.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
68
node_modules/trim-trailing-lines/readme.md
generated
vendored
Normal file
68
node_modules/trim-trailing-lines/readme.md
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
# trim-trailing-lines
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
Remove final newline characters from a string.
|
||||
|
||||
## Installation
|
||||
|
||||
[npm][]:
|
||||
|
||||
```bash
|
||||
npm install trim-trailing-lines
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var trimTrailingLines = require('trim-trailing-lines')
|
||||
|
||||
trimTrailingLines('foo\nbar') // => 'foo\nbar'
|
||||
trimTrailingLines('foo\nbar\n') // => 'foo\nbar'
|
||||
trimTrailingLines('foo\nbar\n\n') // => 'foo\nbar'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `trimTrailingLines(value)`
|
||||
|
||||
Remove final newline characters from `value`.
|
||||
|
||||
###### Parameters
|
||||
|
||||
* `value` (`string`) — Value with trailing newlines, coerced to string.
|
||||
|
||||
###### Returns
|
||||
|
||||
`string` — Value without trailing newlines.
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://img.shields.io/travis/wooorm/trim-trailing-lines.svg
|
||||
|
||||
[build]: https://travis-ci.org/wooorm/trim-trailing-lines
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/trim-trailing-lines.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/trim-trailing-lines
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/trim-trailing-lines.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/trim-trailing-lines
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/trim-trailing-lines.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=trim-trailing-lines
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
Reference in New Issue
Block a user