WIP - add extractor, generate snippet_data

This commit is contained in:
Stefan Fejes
2019-08-20 15:52:05 +02:00
parent 88084d3d30
commit cc8f1d8a7a
37396 changed files with 4588842 additions and 133 deletions

17
node_modules/space-separated-tokens/index.js generated vendored Normal file
View File

@ -0,0 +1,17 @@
'use strict'
exports.parse = parse
exports.stringify = stringify
var empty = ''
var space = ' '
var whiteSpace = /[ \t\n\r\f]+/g
function parse(value) {
var input = String(value || empty).trim()
return input === empty ? [] : input.split(whiteSpace)
}
function stringify(values) {
return values.join(space).trim()
}

22
node_modules/space-separated-tokens/license generated vendored Normal file
View File

@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2016 Titus Wormer <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.

110
node_modules/space-separated-tokens/package.json generated vendored Normal file
View File

@ -0,0 +1,110 @@
{
"_from": "space-separated-tokens@^1.0.0",
"_id": "space-separated-tokens@1.1.4",
"_inBundle": false,
"_integrity": "sha512-UyhMSmeIqZrQn2UdjYpxEkwY9JUrn8pP+7L4f91zRzOQuI8MF1FGLfYU9DKCYeLdo7LXMxwrX5zKFy7eeeVHuA==",
"_location": "/space-separated-tokens",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "space-separated-tokens@^1.0.0",
"name": "space-separated-tokens",
"escapedName": "space-separated-tokens",
"rawSpec": "^1.0.0",
"saveSpec": null,
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
"/hast-to-hyperscript",
"/hast-util-to-html",
"/hastscript"
],
"_resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.4.tgz",
"_shasum": "27910835ae00d0adfcdbd0ad7e611fb9544351fa",
"_spec": "space-separated-tokens@^1.0.0",
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/hastscript",
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
"url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/wooorm/space-separated-tokens/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
"url": "https://wooorm.com"
}
],
"deprecated": false,
"description": "Parse and stringify space-separated tokens",
"devDependencies": {
"browserify": "^16.0.0",
"nyc": "^14.0.0",
"prettier": "^1.12.0",
"remark-cli": "^6.0.1",
"remark-preset-wooorm": "^4.0.0",
"tape": "^4.4.0",
"tinyify": "^2.5.0",
"xo": "^0.24.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/wooorm/space-separated-tokens#readme",
"keywords": [
"dom",
"html",
"space",
"separated",
"tokens",
"parse",
"stringify"
],
"license": "MIT",
"name": "space-separated-tokens",
"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/space-separated-tokens.git"
},
"scripts": {
"build": "npm run build-bundle && npm run build-mangle",
"build-bundle": "browserify . -s spaceSeparatedTokens -o space-separated-tokens.js",
"build-mangle": "browserify . -s spaceSeparatedTokens -p tinyify -o space-separated-tokens.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.4",
"xo": {
"prettier": true,
"esnext": false,
"ignore": [
"space-separated-tokens.js"
]
}
}

94
node_modules/space-separated-tokens/readme.md generated vendored Normal file
View File

@ -0,0 +1,94 @@
# space-separated-tokens
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
Parse and stringify space-separated tokens according to the [spec][].
## Installation
[npm][]:
```bash
npm install space-separated-tokens
```
## Usage
```javascript
var spaceSeparated = require('space-separated-tokens')
spaceSeparated.parse(' foo\tbar\nbaz ')
//=> ['foo', 'bar', 'baz']
spaceSeparated.stringify(['foo', 'bar', 'baz'])
//=> 'foo bar baz'
```
## API
### `spaceSeparated.parse(value)`
Parse space-separated tokens to an array of strings, according to the [spec][].
###### Parameters
* `value` (`string`) — space-separated tokens.
###### Returns
`Array.<string>` — List of tokens.
### `spaceSeparated.stringify(values)`
Compile an array of strings to space-separated tokens.
Note that its not possible to specify empty or white-space only values.
###### Parameters
* `values` (`Array.<string>`) — List of tokens.
###### Returns
`string` — Space-separated tokens.
## Related
* [`collapse-white-space`](https://github.com/wooorm/collapse-white-space)
— Replace multiple white-space characters with a single space
* [`property-information`](https://github.com/wooorm/property-information)
— Information on HTML properties
* [`comma-separated-tokens`](https://github.com/wooorm/comma-separated-tokens)
— Parse/stringify comma-separated tokens
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definition -->
[build-badge]: https://img.shields.io/travis/wooorm/space-separated-tokens.svg
[build]: https://travis-ci.org/wooorm/space-separated-tokens
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/space-separated-tokens.svg
[coverage]: https://codecov.io/github/wooorm/space-separated-tokens
[downloads-badge]: https://img.shields.io/npm/dm/space-separated-tokens.svg
[downloads]: https://www.npmjs.com/package/space-separated-tokens
[size-badge]: https://img.shields.io/bundlephobia/minzip/space-separated-tokens.svg
[size]: https://bundlephobia.com/result?p=space-separated-tokens
[npm]: https://docs.npmjs.com/cli/install
[license]: license
[author]: https://wooorm.com
[spec]: https://html.spec.whatwg.org/#space-separated-tokens