first commit

This commit is contained in:
s.golasch
2023-08-01 13:49:46 +02:00
commit 1fc239fd54
20238 changed files with 3112246 additions and 0 deletions

1
build/node_modules/expand-template/.npmignore generated vendored Normal file
View File

@@ -0,0 +1 @@
node_modules/

8
build/node_modules/expand-template/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,8 @@
sudo: false
language: node_js
node_js:
- '4'
- '0.12'
- '0.10'

41
build/node_modules/expand-template/README.md generated vendored Normal file
View File

@@ -0,0 +1,41 @@
# expand-template
> Expand placeholders in a template string.
[![Build Status](https://travis-ci.org/ralphtheninja/expand-template.svg?branch=master)](https://travis-ci.org/ralphtheninja/expand-template)
[![Greenkeeper badge](https://badges.greenkeeper.io/ralphtheninja/expand-template.svg)](https://greenkeeper.io/)
## Install
```
$ npm i expand-template -S
```
## Usage
Default functionality expands templates using `{}` as separators for string placeholders.
```js
var expand = require('expand-template')()
var template = '{foo}/{foo}/{bar}/{bar}'
console.log(expand(template, {
foo: 'BAR',
bar: 'FOO'
}))
// -> BAR/BAR/FOO/FOO
```
Custom separators:
```js
var expand = require('expand-template')({ sep: '[]' })
var template = '[foo]/[foo]/[bar]/[bar]'
console.log(expand(template, {
foo: 'BAR',
bar: 'FOO'
}))
// -> BAR/BAR/FOO/FOO
```
## License
All code, unless stated otherwise, is dual-licensed under [`WTFPL`](http://www.wtfpl.net/txt/copying/) and [`MIT`](https://opensource.org/licenses/MIT).

25
build/node_modules/expand-template/index.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
module.exports = function (opts) {
var sep = opts ? opts.sep : '{}'
var len = sep.length
var whitespace = '\\s*'
var left = escape(sep.substring(0, len / 2)) + whitespace
var right = whitespace + escape(sep.substring(len / 2, len))
return function (template, values) {
Object.keys(values).forEach(function (key) {
template = template.replace(regExp(key), values[key])
})
return template
}
function escape (s) {
return [].map.call(s, function (char) {
return '\\' + char
}).join('')
}
function regExp (key) {
return new RegExp(left + key + right, 'g')
}
}

60
build/node_modules/expand-template/package.json generated vendored Normal file
View File

@@ -0,0 +1,60 @@
{
"_args": [
[
"expand-template@1.1.0",
"/Users/asciidisco/Desktop/asciidisco.com/build"
]
],
"_from": "expand-template@1.1.0",
"_id": "expand-template@1.1.0",
"_inBundle": false,
"_integrity": "sha512-kkjwkMqj0h4w/sb32ERCDxCQkREMCAgS39DscDnSwDsbxnwwM1BTZySdC3Bn1lhY7vL08n9GoO/fVTynjDgRyQ==",
"_location": "/expand-template",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "expand-template@1.1.0",
"name": "expand-template",
"escapedName": "expand-template",
"rawSpec": "1.1.0",
"saveSpec": null,
"fetchSpec": "1.1.0"
},
"_requiredBy": [
"/prebuild-install"
],
"_resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.0.tgz",
"_spec": "1.1.0",
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
"author": {
"name": "LM",
"email": "ralphtheninja@riseup.net"
},
"bugs": {
"url": "https://github.com/ralphtheninja/expand-template/issues"
},
"dependencies": {},
"description": "Expand placeholders in a template string",
"devDependencies": {
"standard": "^10.0.3",
"tape": "^4.2.2"
},
"homepage": "https://github.com/ralphtheninja/expand-template",
"keywords": [
"template",
"expand",
"replace"
],
"license": "WTFPL",
"main": "index.js",
"name": "expand-template",
"repository": {
"type": "git",
"url": "git+https://github.com/ralphtheninja/expand-template.git"
},
"scripts": {
"test": "tape test.js && standard"
},
"version": "1.1.0"
}

47
build/node_modules/expand-template/test.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
var test = require('tape')
var Expand = require('./')
test('default expands {} placeholders', function (t) {
var expand = Expand()
t.equal(typeof expand, 'function', 'is a function')
t.equal(expand('{foo}/{bar}', {
foo: 'BAR', bar: 'FOO'
}), 'BAR/FOO')
t.equal(expand('{foo}{foo}{foo}', {
foo: 'FOO'
}), 'FOOFOOFOO', 'expands one placeholder many times')
t.end()
})
test('support for custom separators', function (t) {
var expand = Expand({ sep: '[]' })
t.equal(expand('[foo]/[bar]', {
foo: 'BAR', bar: 'FOO'
}), 'BAR/FOO')
t.equal(expand('[foo][foo][foo]', {
foo: 'FOO'
}), 'FOOFOOFOO', 'expands one placeholder many times')
t.end()
})
test('support for longer custom separators', function (t) {
var expand = Expand({ sep: '[[]]' })
t.equal(expand('[[foo]]/[[bar]]', {
foo: 'BAR', bar: 'FOO'
}), 'BAR/FOO')
t.equal(expand('[[foo]][[foo]][[foo]]', {
foo: 'FOO'
}), 'FOOFOOFOO', 'expands one placeholder many times')
t.end()
})
test('whitespace-insensitive', function (t) {
var expand = Expand({ sep: '[]' })
t.equal(expand('[ foo ]/[ bar ]', {
foo: 'BAR', bar: 'FOO'
}), 'BAR/FOO')
t.equal(expand('[ foo ][ foo ][ foo]', {
foo: 'FOO'
}), 'FOOFOOFOO', 'expands one placeholder many times')
t.end()
})