summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/qw
diff options
context:
space:
mode:
Diffstat (limited to 'deps/node/deps/npm/node_modules/qw')
-rw-r--r--deps/node/deps/npm/node_modules/qw/LICENSE13
-rw-r--r--deps/node/deps/npm/node_modules/qw/README.md34
-rw-r--r--deps/node/deps/npm/node_modules/qw/package.json62
-rw-r--r--deps/node/deps/npm/node_modules/qw/qw.js43
4 files changed, 0 insertions, 152 deletions
diff --git a/deps/node/deps/npm/node_modules/qw/LICENSE b/deps/node/deps/npm/node_modules/qw/LICENSE
deleted file mode 100644
index 74bf5afb..00000000
--- a/deps/node/deps/npm/node_modules/qw/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright (c) 2016, Rebecca Turner <me@re-becca.org>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/node/deps/npm/node_modules/qw/README.md b/deps/node/deps/npm/node_modules/qw/README.md
deleted file mode 100644
index 55ba17a9..00000000
--- a/deps/node/deps/npm/node_modules/qw/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# qw
-
-Quoted word literals!
-
-```js
-const qw = require('qw')
-
-const myword = qw` this is
- a long list
- of words`
-// equiv of:
-const myword = [ 'this', 'is', 'a', 'long', 'list', 'of', 'words' ]
-```
-
-You can embed vars in the usual way:
-
-```js
-const mywords = qw`product ${23 * 5} also ${'escaping a string'}`
-// equiv of:
-const mywords = [ 'product', 23 * 5, 'also', 'escaping a string' ]
-```
-
-You can also embed vars inside strings:
-
-```js
-const mywords = qw`product=${23 * 5} also "${'escaping a string'}"`
-// equiv of:
-const mywords = [ 'product=' + (23 * 5), 'also', '"escaping a string"' ]
-```
-
-## DESCRIPTION
-
-This uses template strings to bring over this little common convenience from
-Perl-land.
diff --git a/deps/node/deps/npm/node_modules/qw/package.json b/deps/node/deps/npm/node_modules/qw/package.json
deleted file mode 100644
index dd53aac4..00000000
--- a/deps/node/deps/npm/node_modules/qw/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_args": [
- [
- "qw@1.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "qw@1.0.1",
- "_id": "qw@1.0.1",
- "_inBundle": false,
- "_integrity": "sha1-77/cdA+a0FQwRCassYNBLMi5ltQ=",
- "_location": "/qw",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "qw@1.0.1",
- "name": "qw",
- "escapedName": "qw",
- "rawSpec": "1.0.1",
- "saveSpec": null,
- "fetchSpec": "1.0.1"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/qw/-/qw-1.0.1.tgz",
- "_spec": "1.0.1",
- "_where": "/Users/rebecca/code/npm",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org",
- "url": "http://re-becca.org/"
- },
- "bugs": {
- "url": "https://github.com/iarna/node-qw/issues"
- },
- "dependencies": {},
- "description": "Quoted word literals!",
- "devDependencies": {
- "tap": "^8.0.0"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "qw.js"
- ],
- "homepage": "https://github.com/iarna/node-qw#readme",
- "keywords": [],
- "license": "ISC",
- "main": "qw.js",
- "name": "qw",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/iarna/node-qw.git"
- },
- "scripts": {
- "test": "tap test"
- },
- "version": "1.0.1"
-}
diff --git a/deps/node/deps/npm/node_modules/qw/qw.js b/deps/node/deps/npm/node_modules/qw/qw.js
deleted file mode 100644
index 239e5a56..00000000
--- a/deps/node/deps/npm/node_modules/qw/qw.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict'
-module.exports = qw
-
-function appendLast (arr, str) {
- var last = arr.length - 1
- if (last < 0) {
- arr.push(str)
- } else {
- var lastValue = String(arr[last])
- return arr[last] = lastValue + String(str)
- }
-}
-
-function qw () {
- const args = Object.assign([], arguments[0])
- const values = [].slice.call(arguments, 1)
- const words = []
- let lastWordWasValue = false
- while (args.length) {
- const arg = args.shift()
- const concatValue = arg.length === 0 || arg.slice(-1) !== ' '
- if (arg.trim() !== '') {
- const theseWords = arg.replace(/^\s+|\s+$/g, '').replace(/\s+/g, ' ').split(/ /)
- if (lastWordWasValue && arg[0] !== ' ') {
- appendLast(words, theseWords.shift())
- }
- words.push.apply(words, theseWords)
- }
-
- if (values.length) {
- const val = values.shift()
- if (concatValue) {
- appendLast(words, val)
- } else {
- words.push(val)
- }
- lastWordWasValue = true
- } else {
- lastWordWasValue = false
- }
- }
- return words
-}