forked from arne/asdf-games
Added dependencies and removed node_modules
This commit is contained in:
parent
91af017b19
commit
e89128c6ab
15
node_modules/.bin/atob
generated
vendored
15
node_modules/.bin/atob
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../atob/bin/atob.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../atob/bin/atob.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/atob.cmd
generated
vendored
7
node_modules/.bin/atob.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\atob\bin\atob.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\atob\bin\atob.js" %*
|
|
||||||
)
|
|
15
node_modules/.bin/browserify
generated
vendored
15
node_modules/.bin/browserify
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../browserify/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../browserify/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/browserify.cmd
generated
vendored
7
node_modules/.bin/browserify.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\browserify\bin\cmd.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\browserify\bin\cmd.js" %*
|
|
||||||
)
|
|
15
node_modules/.bin/budo
generated
vendored
15
node_modules/.bin/budo
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../budo/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../budo/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/budo.cmd
generated
vendored
7
node_modules/.bin/budo.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\budo\bin\cmd.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\budo\bin\cmd.js" %*
|
|
||||||
)
|
|
15
node_modules/.bin/garnish
generated
vendored
15
node_modules/.bin/garnish
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../garnish/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../garnish/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/garnish.cmd
generated
vendored
7
node_modules/.bin/garnish.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\garnish\bin\cmd.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\garnish\bin\cmd.js" %*
|
|
||||||
)
|
|
15
node_modules/.bin/has-ansi
generated
vendored
15
node_modules/.bin/has-ansi
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../has-ansi/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../has-ansi/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/has-ansi.cmd
generated
vendored
7
node_modules/.bin/has-ansi.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\has-ansi\cli.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\has-ansi\cli.js" %*
|
|
||||||
)
|
|
15
node_modules/.bin/mime
generated
vendored
15
node_modules/.bin/mime
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../mime/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../mime/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/mime.cmd
generated
vendored
7
node_modules/.bin/mime.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\mime\cli.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\mime\cli.js" %*
|
|
||||||
)
|
|
15
node_modules/.bin/semver
generated
vendored
15
node_modules/.bin/semver
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../semver/bin/semver" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../semver/bin/semver" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/semver.cmd
generated
vendored
7
node_modules/.bin/semver.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\semver\bin\semver" %*
|
|
||||||
)
|
|
15
node_modules/.bin/supports-color
generated
vendored
15
node_modules/.bin/supports-color
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../supports-color/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../supports-color/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/supports-color.cmd
generated
vendored
7
node_modules/.bin/supports-color.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\supports-color\cli.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\supports-color\cli.js" %*
|
|
||||||
)
|
|
15
node_modules/.bin/watchify
generated
vendored
15
node_modules/.bin/watchify
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../watchify/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../watchify/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/watchify.cmd
generated
vendored
7
node_modules/.bin/watchify.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\watchify\bin\cmd.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\watchify\bin\cmd.js" %*
|
|
||||||
)
|
|
15
node_modules/.bin/which
generated
vendored
15
node_modules/.bin/which
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../which/bin/which" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../which/bin/which" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/which.cmd
generated
vendored
7
node_modules/.bin/which.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\which\bin\which" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\which\bin\which" %*
|
|
||||||
)
|
|
236
node_modules/accepts/HISTORY.md
generated
vendored
236
node_modules/accepts/HISTORY.md
generated
vendored
@ -1,236 +0,0 @@
|
|||||||
1.3.7 / 2019-04-29
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: negotiator@0.6.2
|
|
||||||
- Fix sorting charset, encoding, and language with extra parameters
|
|
||||||
|
|
||||||
1.3.6 / 2019-04-28
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.24
|
|
||||||
- deps: mime-db@~1.40.0
|
|
||||||
|
|
||||||
1.3.5 / 2018-02-28
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.18
|
|
||||||
- deps: mime-db@~1.33.0
|
|
||||||
|
|
||||||
1.3.4 / 2017-08-22
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.16
|
|
||||||
- deps: mime-db@~1.29.0
|
|
||||||
|
|
||||||
1.3.3 / 2016-05-02
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.11
|
|
||||||
- deps: mime-db@~1.23.0
|
|
||||||
* deps: negotiator@0.6.1
|
|
||||||
- perf: improve `Accept` parsing speed
|
|
||||||
- perf: improve `Accept-Charset` parsing speed
|
|
||||||
- perf: improve `Accept-Encoding` parsing speed
|
|
||||||
- perf: improve `Accept-Language` parsing speed
|
|
||||||
|
|
||||||
1.3.2 / 2016-03-08
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.10
|
|
||||||
- Fix extension of `application/dash+xml`
|
|
||||||
- Update primary extension for `audio/mp4`
|
|
||||||
- deps: mime-db@~1.22.0
|
|
||||||
|
|
||||||
1.3.1 / 2016-01-19
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.9
|
|
||||||
- deps: mime-db@~1.21.0
|
|
||||||
|
|
||||||
1.3.0 / 2015-09-29
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.7
|
|
||||||
- deps: mime-db@~1.19.0
|
|
||||||
* deps: negotiator@0.6.0
|
|
||||||
- Fix including type extensions in parameters in `Accept` parsing
|
|
||||||
- Fix parsing `Accept` parameters with quoted equals
|
|
||||||
- Fix parsing `Accept` parameters with quoted semicolons
|
|
||||||
- Lazy-load modules from main entry point
|
|
||||||
- perf: delay type concatenation until needed
|
|
||||||
- perf: enable strict mode
|
|
||||||
- perf: hoist regular expressions
|
|
||||||
- perf: remove closures getting spec properties
|
|
||||||
- perf: remove a closure from media type parsing
|
|
||||||
- perf: remove property delete from media type parsing
|
|
||||||
|
|
||||||
1.2.13 / 2015-09-06
|
|
||||||
===================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.6
|
|
||||||
- deps: mime-db@~1.18.0
|
|
||||||
|
|
||||||
1.2.12 / 2015-07-30
|
|
||||||
===================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.4
|
|
||||||
- deps: mime-db@~1.16.0
|
|
||||||
|
|
||||||
1.2.11 / 2015-07-16
|
|
||||||
===================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.3
|
|
||||||
- deps: mime-db@~1.15.0
|
|
||||||
|
|
||||||
1.2.10 / 2015-07-01
|
|
||||||
===================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.2
|
|
||||||
- deps: mime-db@~1.14.0
|
|
||||||
|
|
||||||
1.2.9 / 2015-06-08
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.1
|
|
||||||
- perf: fix deopt during mapping
|
|
||||||
|
|
||||||
1.2.8 / 2015-06-07
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.1.0
|
|
||||||
- deps: mime-db@~1.13.0
|
|
||||||
* perf: avoid argument reassignment & argument slice
|
|
||||||
* perf: avoid negotiator recursive construction
|
|
||||||
* perf: enable strict mode
|
|
||||||
* perf: remove unnecessary bitwise operator
|
|
||||||
|
|
||||||
1.2.7 / 2015-05-10
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: negotiator@0.5.3
|
|
||||||
- Fix media type parameter matching to be case-insensitive
|
|
||||||
|
|
||||||
1.2.6 / 2015-05-07
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.0.11
|
|
||||||
- deps: mime-db@~1.9.1
|
|
||||||
* deps: negotiator@0.5.2
|
|
||||||
- Fix comparing media types with quoted values
|
|
||||||
- Fix splitting media types with quoted commas
|
|
||||||
|
|
||||||
1.2.5 / 2015-03-13
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.0.10
|
|
||||||
- deps: mime-db@~1.8.0
|
|
||||||
|
|
||||||
1.2.4 / 2015-02-14
|
|
||||||
==================
|
|
||||||
|
|
||||||
* Support Node.js 0.6
|
|
||||||
* deps: mime-types@~2.0.9
|
|
||||||
- deps: mime-db@~1.7.0
|
|
||||||
* deps: negotiator@0.5.1
|
|
||||||
- Fix preference sorting to be stable for long acceptable lists
|
|
||||||
|
|
||||||
1.2.3 / 2015-01-31
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.0.8
|
|
||||||
- deps: mime-db@~1.6.0
|
|
||||||
|
|
||||||
1.2.2 / 2014-12-30
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.0.7
|
|
||||||
- deps: mime-db@~1.5.0
|
|
||||||
|
|
||||||
1.2.1 / 2014-12-30
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.0.5
|
|
||||||
- deps: mime-db@~1.3.1
|
|
||||||
|
|
||||||
1.2.0 / 2014-12-19
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: negotiator@0.5.0
|
|
||||||
- Fix list return order when large accepted list
|
|
||||||
- Fix missing identity encoding when q=0 exists
|
|
||||||
- Remove dynamic building of Negotiator class
|
|
||||||
|
|
||||||
1.1.4 / 2014-12-10
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.0.4
|
|
||||||
- deps: mime-db@~1.3.0
|
|
||||||
|
|
||||||
1.1.3 / 2014-11-09
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.0.3
|
|
||||||
- deps: mime-db@~1.2.0
|
|
||||||
|
|
||||||
1.1.2 / 2014-10-14
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: negotiator@0.4.9
|
|
||||||
- Fix error when media type has invalid parameter
|
|
||||||
|
|
||||||
1.1.1 / 2014-09-28
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: mime-types@~2.0.2
|
|
||||||
- deps: mime-db@~1.1.0
|
|
||||||
* deps: negotiator@0.4.8
|
|
||||||
- Fix all negotiations to be case-insensitive
|
|
||||||
- Stable sort preferences of same quality according to client order
|
|
||||||
|
|
||||||
1.1.0 / 2014-09-02
|
|
||||||
==================
|
|
||||||
|
|
||||||
* update `mime-types`
|
|
||||||
|
|
||||||
1.0.7 / 2014-07-04
|
|
||||||
==================
|
|
||||||
|
|
||||||
* Fix wrong type returned from `type` when match after unknown extension
|
|
||||||
|
|
||||||
1.0.6 / 2014-06-24
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: negotiator@0.4.7
|
|
||||||
|
|
||||||
1.0.5 / 2014-06-20
|
|
||||||
==================
|
|
||||||
|
|
||||||
* fix crash when unknown extension given
|
|
||||||
|
|
||||||
1.0.4 / 2014-06-19
|
|
||||||
==================
|
|
||||||
|
|
||||||
* use `mime-types`
|
|
||||||
|
|
||||||
1.0.3 / 2014-06-11
|
|
||||||
==================
|
|
||||||
|
|
||||||
* deps: negotiator@0.4.6
|
|
||||||
- Order by specificity when quality is the same
|
|
||||||
|
|
||||||
1.0.2 / 2014-05-29
|
|
||||||
==================
|
|
||||||
|
|
||||||
* Fix interpretation when header not in request
|
|
||||||
* deps: pin negotiator@0.4.5
|
|
||||||
|
|
||||||
1.0.1 / 2014-01-18
|
|
||||||
==================
|
|
||||||
|
|
||||||
* Identity encoding isn't always acceptable
|
|
||||||
* deps: negotiator@~0.4.0
|
|
||||||
|
|
||||||
1.0.0 / 2013-12-27
|
|
||||||
==================
|
|
||||||
|
|
||||||
* Genesis
|
|
23
node_modules/accepts/LICENSE
generated
vendored
23
node_modules/accepts/LICENSE
generated
vendored
@ -1,23 +0,0 @@
|
|||||||
(The MIT License)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
|
||||||
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.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.
|
|
142
node_modules/accepts/README.md
generated
vendored
142
node_modules/accepts/README.md
generated
vendored
@ -1,142 +0,0 @@
|
|||||||
# accepts
|
|
||||||
|
|
||||||
[![NPM Version][npm-version-image]][npm-url]
|
|
||||||
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
||||||
[![Node.js Version][node-version-image]][node-version-url]
|
|
||||||
[![Build Status][travis-image]][travis-url]
|
|
||||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
||||||
|
|
||||||
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
|
|
||||||
Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
|
|
||||||
|
|
||||||
In addition to negotiator, it allows:
|
|
||||||
|
|
||||||
- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
|
|
||||||
as well as `('text/html', 'application/json')`.
|
|
||||||
- Allows type shorthands such as `json`.
|
|
||||||
- Returns `false` when no types match
|
|
||||||
- Treats non-existent headers as `*`
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
This is a [Node.js](https://nodejs.org/en/) module available through the
|
|
||||||
[npm registry](https://www.npmjs.com/). Installation is done using the
|
|
||||||
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install accepts
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
<!-- eslint-disable no-unused-vars -->
|
|
||||||
|
|
||||||
```js
|
|
||||||
var accepts = require('accepts')
|
|
||||||
```
|
|
||||||
|
|
||||||
### accepts(req)
|
|
||||||
|
|
||||||
Create a new `Accepts` object for the given `req`.
|
|
||||||
|
|
||||||
#### .charset(charsets)
|
|
||||||
|
|
||||||
Return the first accepted charset. If nothing in `charsets` is accepted,
|
|
||||||
then `false` is returned.
|
|
||||||
|
|
||||||
#### .charsets()
|
|
||||||
|
|
||||||
Return the charsets that the request accepts, in the order of the client's
|
|
||||||
preference (most preferred first).
|
|
||||||
|
|
||||||
#### .encoding(encodings)
|
|
||||||
|
|
||||||
Return the first accepted encoding. If nothing in `encodings` is accepted,
|
|
||||||
then `false` is returned.
|
|
||||||
|
|
||||||
#### .encodings()
|
|
||||||
|
|
||||||
Return the encodings that the request accepts, in the order of the client's
|
|
||||||
preference (most preferred first).
|
|
||||||
|
|
||||||
#### .language(languages)
|
|
||||||
|
|
||||||
Return the first accepted language. If nothing in `languages` is accepted,
|
|
||||||
then `false` is returned.
|
|
||||||
|
|
||||||
#### .languages()
|
|
||||||
|
|
||||||
Return the languages that the request accepts, in the order of the client's
|
|
||||||
preference (most preferred first).
|
|
||||||
|
|
||||||
#### .type(types)
|
|
||||||
|
|
||||||
Return the first accepted type (and it is returned as the same text as what
|
|
||||||
appears in the `types` array). If nothing in `types` is accepted, then `false`
|
|
||||||
is returned.
|
|
||||||
|
|
||||||
The `types` array can contain full MIME types or file extensions. Any value
|
|
||||||
that is not a full MIME types is passed to `require('mime-types').lookup`.
|
|
||||||
|
|
||||||
#### .types()
|
|
||||||
|
|
||||||
Return the types that the request accepts, in the order of the client's
|
|
||||||
preference (most preferred first).
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
### Simple type negotiation
|
|
||||||
|
|
||||||
This simple example shows how to use `accepts` to return a different typed
|
|
||||||
respond body based on what the client wants to accept. The server lists it's
|
|
||||||
preferences in order and will get back the best match between the client and
|
|
||||||
server.
|
|
||||||
|
|
||||||
```js
|
|
||||||
var accepts = require('accepts')
|
|
||||||
var http = require('http')
|
|
||||||
|
|
||||||
function app (req, res) {
|
|
||||||
var accept = accepts(req)
|
|
||||||
|
|
||||||
// the order of this list is significant; should be server preferred order
|
|
||||||
switch (accept.type(['json', 'html'])) {
|
|
||||||
case 'json':
|
|
||||||
res.setHeader('Content-Type', 'application/json')
|
|
||||||
res.write('{"hello":"world!"}')
|
|
||||||
break
|
|
||||||
case 'html':
|
|
||||||
res.setHeader('Content-Type', 'text/html')
|
|
||||||
res.write('<b>hello, world!</b>')
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
// the fallback is text/plain, so no need to specify it above
|
|
||||||
res.setHeader('Content-Type', 'text/plain')
|
|
||||||
res.write('hello, world!')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
res.end()
|
|
||||||
}
|
|
||||||
|
|
||||||
http.createServer(app).listen(3000)
|
|
||||||
```
|
|
||||||
|
|
||||||
You can test this out with the cURL program:
|
|
||||||
```sh
|
|
||||||
curl -I -H'Accept: text/html' http://localhost:3000/
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
[MIT](LICENSE)
|
|
||||||
|
|
||||||
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
|
|
||||||
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
|
|
||||||
[node-version-image]: https://badgen.net/npm/node/accepts
|
|
||||||
[node-version-url]: https://nodejs.org/en/download
|
|
||||||
[npm-downloads-image]: https://badgen.net/npm/dm/accepts
|
|
||||||
[npm-url]: https://npmjs.org/package/accepts
|
|
||||||
[npm-version-image]: https://badgen.net/npm/v/accepts
|
|
||||||
[travis-image]: https://badgen.net/travis/jshttp/accepts/master
|
|
||||||
[travis-url]: https://travis-ci.org/jshttp/accepts
|
|
238
node_modules/accepts/index.js
generated
vendored
238
node_modules/accepts/index.js
generated
vendored
@ -1,238 +0,0 @@
|
|||||||
/*!
|
|
||||||
* accepts
|
|
||||||
* Copyright(c) 2014 Jonathan Ong
|
|
||||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
||||||
* MIT Licensed
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module dependencies.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
|
|
||||||
var Negotiator = require('negotiator')
|
|
||||||
var mime = require('mime-types')
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module exports.
|
|
||||||
* @public
|
|
||||||
*/
|
|
||||||
|
|
||||||
module.exports = Accepts
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new Accepts object for the given req.
|
|
||||||
*
|
|
||||||
* @param {object} req
|
|
||||||
* @public
|
|
||||||
*/
|
|
||||||
|
|
||||||
function Accepts (req) {
|
|
||||||
if (!(this instanceof Accepts)) {
|
|
||||||
return new Accepts(req)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.headers = req.headers
|
|
||||||
this.negotiator = new Negotiator(req)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the given `type(s)` is acceptable, returning
|
|
||||||
* the best match when true, otherwise `undefined`, in which
|
|
||||||
* case you should respond with 406 "Not Acceptable".
|
|
||||||
*
|
|
||||||
* The `type` value may be a single mime type string
|
|
||||||
* such as "application/json", the extension name
|
|
||||||
* such as "json" or an array `["json", "html", "text/plain"]`. When a list
|
|
||||||
* or array is given the _best_ match, if any is returned.
|
|
||||||
*
|
|
||||||
* Examples:
|
|
||||||
*
|
|
||||||
* // Accept: text/html
|
|
||||||
* this.types('html');
|
|
||||||
* // => "html"
|
|
||||||
*
|
|
||||||
* // Accept: text/*, application/json
|
|
||||||
* this.types('html');
|
|
||||||
* // => "html"
|
|
||||||
* this.types('text/html');
|
|
||||||
* // => "text/html"
|
|
||||||
* this.types('json', 'text');
|
|
||||||
* // => "json"
|
|
||||||
* this.types('application/json');
|
|
||||||
* // => "application/json"
|
|
||||||
*
|
|
||||||
* // Accept: text/*, application/json
|
|
||||||
* this.types('image/png');
|
|
||||||
* this.types('png');
|
|
||||||
* // => undefined
|
|
||||||
*
|
|
||||||
* // Accept: text/*;q=.5, application/json
|
|
||||||
* this.types(['html', 'json']);
|
|
||||||
* this.types('html', 'json');
|
|
||||||
* // => "json"
|
|
||||||
*
|
|
||||||
* @param {String|Array} types...
|
|
||||||
* @return {String|Array|Boolean}
|
|
||||||
* @public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Accepts.prototype.type =
|
|
||||||
Accepts.prototype.types = function (types_) {
|
|
||||||
var types = types_
|
|
||||||
|
|
||||||
// support flattened arguments
|
|
||||||
if (types && !Array.isArray(types)) {
|
|
||||||
types = new Array(arguments.length)
|
|
||||||
for (var i = 0; i < types.length; i++) {
|
|
||||||
types[i] = arguments[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// no types, return all requested types
|
|
||||||
if (!types || types.length === 0) {
|
|
||||||
return this.negotiator.mediaTypes()
|
|
||||||
}
|
|
||||||
|
|
||||||
// no accept header, return first given type
|
|
||||||
if (!this.headers.accept) {
|
|
||||||
return types[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
var mimes = types.map(extToMime)
|
|
||||||
var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
|
|
||||||
var first = accepts[0]
|
|
||||||
|
|
||||||
return first
|
|
||||||
? types[mimes.indexOf(first)]
|
|
||||||
: false
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return accepted encodings or best fit based on `encodings`.
|
|
||||||
*
|
|
||||||
* Given `Accept-Encoding: gzip, deflate`
|
|
||||||
* an array sorted by quality is returned:
|
|
||||||
*
|
|
||||||
* ['gzip', 'deflate']
|
|
||||||
*
|
|
||||||
* @param {String|Array} encodings...
|
|
||||||
* @return {String|Array}
|
|
||||||
* @public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Accepts.prototype.encoding =
|
|
||||||
Accepts.prototype.encodings = function (encodings_) {
|
|
||||||
var encodings = encodings_
|
|
||||||
|
|
||||||
// support flattened arguments
|
|
||||||
if (encodings && !Array.isArray(encodings)) {
|
|
||||||
encodings = new Array(arguments.length)
|
|
||||||
for (var i = 0; i < encodings.length; i++) {
|
|
||||||
encodings[i] = arguments[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// no encodings, return all requested encodings
|
|
||||||
if (!encodings || encodings.length === 0) {
|
|
||||||
return this.negotiator.encodings()
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.negotiator.encodings(encodings)[0] || false
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return accepted charsets or best fit based on `charsets`.
|
|
||||||
*
|
|
||||||
* Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
|
|
||||||
* an array sorted by quality is returned:
|
|
||||||
*
|
|
||||||
* ['utf-8', 'utf-7', 'iso-8859-1']
|
|
||||||
*
|
|
||||||
* @param {String|Array} charsets...
|
|
||||||
* @return {String|Array}
|
|
||||||
* @public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Accepts.prototype.charset =
|
|
||||||
Accepts.prototype.charsets = function (charsets_) {
|
|
||||||
var charsets = charsets_
|
|
||||||
|
|
||||||
// support flattened arguments
|
|
||||||
if (charsets && !Array.isArray(charsets)) {
|
|
||||||
charsets = new Array(arguments.length)
|
|
||||||
for (var i = 0; i < charsets.length; i++) {
|
|
||||||
charsets[i] = arguments[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// no charsets, return all requested charsets
|
|
||||||
if (!charsets || charsets.length === 0) {
|
|
||||||
return this.negotiator.charsets()
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.negotiator.charsets(charsets)[0] || false
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return accepted languages or best fit based on `langs`.
|
|
||||||
*
|
|
||||||
* Given `Accept-Language: en;q=0.8, es, pt`
|
|
||||||
* an array sorted by quality is returned:
|
|
||||||
*
|
|
||||||
* ['es', 'pt', 'en']
|
|
||||||
*
|
|
||||||
* @param {String|Array} langs...
|
|
||||||
* @return {Array|String}
|
|
||||||
* @public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Accepts.prototype.lang =
|
|
||||||
Accepts.prototype.langs =
|
|
||||||
Accepts.prototype.language =
|
|
||||||
Accepts.prototype.languages = function (languages_) {
|
|
||||||
var languages = languages_
|
|
||||||
|
|
||||||
// support flattened arguments
|
|
||||||
if (languages && !Array.isArray(languages)) {
|
|
||||||
languages = new Array(arguments.length)
|
|
||||||
for (var i = 0; i < languages.length; i++) {
|
|
||||||
languages[i] = arguments[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// no languages, return all requested languages
|
|
||||||
if (!languages || languages.length === 0) {
|
|
||||||
return this.negotiator.languages()
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.negotiator.languages(languages)[0] || false
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert extnames to mime.
|
|
||||||
*
|
|
||||||
* @param {String} type
|
|
||||||
* @return {String}
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
|
|
||||||
function extToMime (type) {
|
|
||||||
return type.indexOf('/') === -1
|
|
||||||
? mime.lookup(type)
|
|
||||||
: type
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if mime is valid.
|
|
||||||
*
|
|
||||||
* @param {String} type
|
|
||||||
* @return {String}
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
|
|
||||||
function validMime (type) {
|
|
||||||
return typeof type === 'string'
|
|
||||||
}
|
|
86
node_modules/accepts/package.json
generated
vendored
86
node_modules/accepts/package.json
generated
vendored
@ -1,86 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "accepts@~1.3.4",
|
|
||||||
"_id": "accepts@1.3.7",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
|
|
||||||
"_location": "/accepts",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "accepts@~1.3.4",
|
|
||||||
"name": "accepts",
|
|
||||||
"escapedName": "accepts",
|
|
||||||
"rawSpec": "~1.3.4",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "~1.3.4"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/serve-index"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
|
|
||||||
"_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd",
|
|
||||||
"_spec": "accepts@~1.3.4",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\serve-index",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jshttp/accepts/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Douglas Christopher Wilson",
|
|
||||||
"email": "doug@somethingdoug.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Jonathan Ong",
|
|
||||||
"email": "me@jongleberry.com",
|
|
||||||
"url": "http://jongleberry.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"mime-types": "~2.1.24",
|
|
||||||
"negotiator": "0.6.2"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Higher-level content negotiation",
|
|
||||||
"devDependencies": {
|
|
||||||
"deep-equal": "1.0.1",
|
|
||||||
"eslint": "5.16.0",
|
|
||||||
"eslint-config-standard": "12.0.0",
|
|
||||||
"eslint-plugin-import": "2.17.2",
|
|
||||||
"eslint-plugin-markdown": "1.0.0",
|
|
||||||
"eslint-plugin-node": "8.0.1",
|
|
||||||
"eslint-plugin-promise": "4.1.1",
|
|
||||||
"eslint-plugin-standard": "4.0.0",
|
|
||||||
"mocha": "6.1.4",
|
|
||||||
"nyc": "14.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"LICENSE",
|
|
||||||
"HISTORY.md",
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jshttp/accepts#readme",
|
|
||||||
"keywords": [
|
|
||||||
"content",
|
|
||||||
"negotiation",
|
|
||||||
"accept",
|
|
||||||
"accepts"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"name": "accepts",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jshttp/accepts.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"lint": "eslint --plugin markdown --ext js,md .",
|
|
||||||
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
||||||
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
||||||
"test-travis": "nyc --reporter=text npm test"
|
|
||||||
},
|
|
||||||
"version": "1.3.7"
|
|
||||||
}
|
|
4
node_modules/ansi-regex/index.js
generated
vendored
4
node_modules/ansi-regex/index.js
generated
vendored
@ -1,4 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
module.exports = function () {
|
|
||||||
return /\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g;
|
|
||||||
};
|
|
84
node_modules/ansi-regex/package.json
generated
vendored
84
node_modules/ansi-regex/package.json
generated
vendored
@ -1,84 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "ansi-regex@^0.2.0",
|
|
||||||
"_id": "ansi-regex@0.2.1",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=",
|
|
||||||
"_location": "/ansi-regex",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "ansi-regex@^0.2.0",
|
|
||||||
"name": "ansi-regex",
|
|
||||||
"escapedName": "ansi-regex",
|
|
||||||
"rawSpec": "^0.2.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^0.2.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/chalk/strip-ansi",
|
|
||||||
"/has-ansi"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz",
|
|
||||||
"_shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9",
|
|
||||||
"_spec": "ansi-regex@^0.2.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\has-ansi",
|
|
||||||
"author": {
|
|
||||||
"name": "Sindre Sorhus",
|
|
||||||
"email": "sindresorhus@gmail.com",
|
|
||||||
"url": "http://sindresorhus.com"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/sindresorhus/ansi-regex/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Regular expression for matching ANSI escape codes",
|
|
||||||
"devDependencies": {
|
|
||||||
"mocha": "*"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/sindresorhus/ansi-regex#readme",
|
|
||||||
"keywords": [
|
|
||||||
"ansi",
|
|
||||||
"styles",
|
|
||||||
"color",
|
|
||||||
"colour",
|
|
||||||
"colors",
|
|
||||||
"terminal",
|
|
||||||
"console",
|
|
||||||
"cli",
|
|
||||||
"string",
|
|
||||||
"tty",
|
|
||||||
"escape",
|
|
||||||
"formatting",
|
|
||||||
"rgb",
|
|
||||||
"256",
|
|
||||||
"shell",
|
|
||||||
"xterm",
|
|
||||||
"command-line",
|
|
||||||
"text",
|
|
||||||
"regex",
|
|
||||||
"regexp",
|
|
||||||
"re",
|
|
||||||
"match",
|
|
||||||
"test",
|
|
||||||
"find",
|
|
||||||
"pattern"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"name": "ansi-regex",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/sindresorhus/ansi-regex.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"version": "0.2.1"
|
|
||||||
}
|
|
33
node_modules/ansi-regex/readme.md
generated
vendored
33
node_modules/ansi-regex/readme.md
generated
vendored
@ -1,33 +0,0 @@
|
|||||||
# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)
|
|
||||||
|
|
||||||
> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
||||||
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save ansi-regex
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var ansiRegex = require('ansi-regex');
|
|
||||||
|
|
||||||
ansiRegex().test('\u001b[4mcake\u001b[0m');
|
|
||||||
//=> true
|
|
||||||
|
|
||||||
ansiRegex().test('cake');
|
|
||||||
//=> false
|
|
||||||
|
|
||||||
'\u001b[4mcake\u001b[0m'.match(ansiRegex());
|
|
||||||
//=> ['\u001b[4m', '\u001b[0m']
|
|
||||||
```
|
|
||||||
|
|
||||||
*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.*
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
|
40
node_modules/ansi-styles/index.js
generated
vendored
40
node_modules/ansi-styles/index.js
generated
vendored
@ -1,40 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
var styles = module.exports;
|
|
||||||
|
|
||||||
var codes = {
|
|
||||||
reset: [0, 0],
|
|
||||||
|
|
||||||
bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
|
|
||||||
dim: [2, 22],
|
|
||||||
italic: [3, 23],
|
|
||||||
underline: [4, 24],
|
|
||||||
inverse: [7, 27],
|
|
||||||
hidden: [8, 28],
|
|
||||||
strikethrough: [9, 29],
|
|
||||||
|
|
||||||
black: [30, 39],
|
|
||||||
red: [31, 39],
|
|
||||||
green: [32, 39],
|
|
||||||
yellow: [33, 39],
|
|
||||||
blue: [34, 39],
|
|
||||||
magenta: [35, 39],
|
|
||||||
cyan: [36, 39],
|
|
||||||
white: [37, 39],
|
|
||||||
gray: [90, 39],
|
|
||||||
|
|
||||||
bgBlack: [40, 49],
|
|
||||||
bgRed: [41, 49],
|
|
||||||
bgGreen: [42, 49],
|
|
||||||
bgYellow: [43, 49],
|
|
||||||
bgBlue: [44, 49],
|
|
||||||
bgMagenta: [45, 49],
|
|
||||||
bgCyan: [46, 49],
|
|
||||||
bgWhite: [47, 49]
|
|
||||||
};
|
|
||||||
|
|
||||||
Object.keys(codes).forEach(function (key) {
|
|
||||||
var val = codes[key];
|
|
||||||
var style = styles[key] = {};
|
|
||||||
style.open = '\u001b[' + val[0] + 'm';
|
|
||||||
style.close = '\u001b[' + val[1] + 'm';
|
|
||||||
});
|
|
78
node_modules/ansi-styles/package.json
generated
vendored
78
node_modules/ansi-styles/package.json
generated
vendored
@ -1,78 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "ansi-styles@^1.1.0",
|
|
||||||
"_id": "ansi-styles@1.1.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=",
|
|
||||||
"_location": "/ansi-styles",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "ansi-styles@^1.1.0",
|
|
||||||
"name": "ansi-styles",
|
|
||||||
"escapedName": "ansi-styles",
|
|
||||||
"rawSpec": "^1.1.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.1.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/chalk"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz",
|
|
||||||
"_shasum": "eaecbf66cd706882760b2f4691582b8f55d7a7de",
|
|
||||||
"_spec": "ansi-styles@^1.1.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\chalk",
|
|
||||||
"author": {
|
|
||||||
"name": "Sindre Sorhus",
|
|
||||||
"email": "sindresorhus@gmail.com",
|
|
||||||
"url": "http://sindresorhus.com"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/sindresorhus/ansi-styles/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "ANSI escape codes for styling strings in the terminal",
|
|
||||||
"devDependencies": {
|
|
||||||
"mocha": "*"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/sindresorhus/ansi-styles#readme",
|
|
||||||
"keywords": [
|
|
||||||
"ansi",
|
|
||||||
"styles",
|
|
||||||
"color",
|
|
||||||
"colour",
|
|
||||||
"colors",
|
|
||||||
"terminal",
|
|
||||||
"console",
|
|
||||||
"cli",
|
|
||||||
"string",
|
|
||||||
"tty",
|
|
||||||
"escape",
|
|
||||||
"formatting",
|
|
||||||
"rgb",
|
|
||||||
"256",
|
|
||||||
"shell",
|
|
||||||
"xterm",
|
|
||||||
"log",
|
|
||||||
"logging",
|
|
||||||
"command-line",
|
|
||||||
"text"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"name": "ansi-styles",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/sindresorhus/ansi-styles.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"version": "1.1.0"
|
|
||||||
}
|
|
70
node_modules/ansi-styles/readme.md
generated
vendored
70
node_modules/ansi-styles/readme.md
generated
vendored
@ -1,70 +0,0 @@
|
|||||||
# ansi-styles [![Build Status](https://travis-ci.org/sindresorhus/ansi-styles.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-styles)
|
|
||||||
|
|
||||||
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
|
||||||
|
|
||||||
You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.
|
|
||||||
|
|
||||||
![screenshot](screenshot.png)
|
|
||||||
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save ansi-styles
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var ansi = require('ansi-styles');
|
|
||||||
|
|
||||||
console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
Each style has an `open` and `close` property.
|
|
||||||
|
|
||||||
|
|
||||||
## Styles
|
|
||||||
|
|
||||||
### General
|
|
||||||
|
|
||||||
- `reset`
|
|
||||||
- `bold`
|
|
||||||
- `dim`
|
|
||||||
- `italic` *(not widely supported)*
|
|
||||||
- `underline`
|
|
||||||
- `inverse`
|
|
||||||
- `hidden`
|
|
||||||
- `strikethrough` *(not widely supported)*
|
|
||||||
|
|
||||||
### Text colors
|
|
||||||
|
|
||||||
- `black`
|
|
||||||
- `red`
|
|
||||||
- `green`
|
|
||||||
- `yellow`
|
|
||||||
- `blue`
|
|
||||||
- `magenta`
|
|
||||||
- `cyan`
|
|
||||||
- `white`
|
|
||||||
- `gray`
|
|
||||||
|
|
||||||
### Background colors
|
|
||||||
|
|
||||||
- `bgBlack`
|
|
||||||
- `bgRed`
|
|
||||||
- `bgGreen`
|
|
||||||
- `bgYellow`
|
|
||||||
- `bgBlue`
|
|
||||||
- `bgMagenta`
|
|
||||||
- `bgCyan`
|
|
||||||
- `bgWhite`
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
|
15
node_modules/anymatch/LICENSE
generated
vendored
15
node_modules/anymatch/LICENSE
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) 2014 Elan Shanker
|
|
||||||
|
|
||||||
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.
|
|
99
node_modules/anymatch/README.md
generated
vendored
99
node_modules/anymatch/README.md
generated
vendored
@ -1,99 +0,0 @@
|
|||||||
anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master)
|
|
||||||
======
|
|
||||||
Javascript module to match a string against a regular expression, glob, string,
|
|
||||||
or function that takes the string as an argument and returns a truthy or falsy
|
|
||||||
value. The matcher can also be an array of any or all of these. Useful for
|
|
||||||
allowing a very flexible user-defined config to define things like file paths.
|
|
||||||
|
|
||||||
__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__
|
|
||||||
|
|
||||||
[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/)
|
|
||||||
[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/)
|
|
||||||
|
|
||||||
Usage
|
|
||||||
-----
|
|
||||||
```sh
|
|
||||||
npm install anymatch --save
|
|
||||||
```
|
|
||||||
|
|
||||||
#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex])
|
|
||||||
* __matchers__: (_Array|String|RegExp|Function_)
|
|
||||||
String to be directly matched, string with glob patterns, regular expression
|
|
||||||
test, function that takes the testString as an argument and returns a truthy
|
|
||||||
value if it should be matched, or an array of any number and mix of these types.
|
|
||||||
* __testString__: (_String|Array_) The string to test against the matchers. If
|
|
||||||
passed as an array, the first element of the array will be used as the
|
|
||||||
`testString` for non-function matchers, while the entire array will be applied
|
|
||||||
as the arguments for function matchers.
|
|
||||||
* __returnIndex__: (_Boolean [optional]_) If true, return the array index of
|
|
||||||
the first matcher that that testString matched, or -1 if no match, instead of a
|
|
||||||
boolean result.
|
|
||||||
* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a
|
|
||||||
subset out of the array of provided matchers to test against. Can be useful
|
|
||||||
with bound matcher functions (see below). When used with `returnIndex = true`
|
|
||||||
preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e.
|
|
||||||
includes array members up to, but not including endIndex).
|
|
||||||
|
|
||||||
```js
|
|
||||||
var anymatch = require('anymatch');
|
|
||||||
|
|
||||||
var matchers = [
|
|
||||||
'path/to/file.js',
|
|
||||||
'path/anyjs/**/*.js',
|
|
||||||
/foo\.js$/,
|
|
||||||
function (string) {
|
|
||||||
return string.indexOf('bar') !== -1 && string.length > 10
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
anymatch(matchers, 'path/to/file.js'); // true
|
|
||||||
anymatch(matchers, 'path/anyjs/baz.js'); // true
|
|
||||||
anymatch(matchers, 'path/to/foo.js'); // true
|
|
||||||
anymatch(matchers, 'path/to/bar.js'); // true
|
|
||||||
anymatch(matchers, 'bar.js'); // false
|
|
||||||
|
|
||||||
// returnIndex = true
|
|
||||||
anymatch(matchers, 'foo.js', true); // 2
|
|
||||||
anymatch(matchers, 'path/anyjs/foo.js', true); // 1
|
|
||||||
|
|
||||||
// skip matchers
|
|
||||||
anymatch(matchers, 'path/to/file.js', false, 1); // false
|
|
||||||
anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2
|
|
||||||
anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1
|
|
||||||
|
|
||||||
// using globs to match directories and their children
|
|
||||||
anymatch('node_modules', 'node_modules'); // true
|
|
||||||
anymatch('node_modules', 'node_modules/somelib/index.js'); // false
|
|
||||||
anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true
|
|
||||||
anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false
|
|
||||||
anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true
|
|
||||||
```
|
|
||||||
|
|
||||||
#### anymatch (matchers)
|
|
||||||
You can also pass in only your matcher(s) to get a curried function that has
|
|
||||||
already been bound to the provided matching criteria. This can be used as an
|
|
||||||
`Array.prototype.filter` callback.
|
|
||||||
|
|
||||||
```js
|
|
||||||
var matcher = anymatch(matchers);
|
|
||||||
|
|
||||||
matcher('path/to/file.js'); // true
|
|
||||||
matcher('path/anyjs/baz.js', true); // 1
|
|
||||||
matcher('path/anyjs/baz.js', true, 2); // -1
|
|
||||||
|
|
||||||
['foo.js', 'bar.js'].filter(matcher); // ['foo.js']
|
|
||||||
```
|
|
||||||
|
|
||||||
Change Log
|
|
||||||
----------
|
|
||||||
[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases)
|
|
||||||
|
|
||||||
NOTE: As of v2.0.0, [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information).
|
|
||||||
|
|
||||||
NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch)
|
|
||||||
for glob pattern matching. Issues with glob pattern matching should be
|
|
||||||
reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues).
|
|
||||||
|
|
||||||
License
|
|
||||||
-------
|
|
||||||
[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE)
|
|
67
node_modules/anymatch/index.js
generated
vendored
67
node_modules/anymatch/index.js
generated
vendored
@ -1,67 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
var micromatch = require('micromatch');
|
|
||||||
var normalize = require('normalize-path');
|
|
||||||
var path = require('path'); // required for tests.
|
|
||||||
var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); };
|
|
||||||
|
|
||||||
var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) {
|
|
||||||
criteria = arrify(criteria);
|
|
||||||
value = arrify(value);
|
|
||||||
if (arguments.length === 1) {
|
|
||||||
return anymatch.bind(null, criteria.map(function(criterion) {
|
|
||||||
return typeof criterion === 'string' && criterion[0] !== '!' ?
|
|
||||||
micromatch.matcher(criterion) : criterion;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
startIndex = startIndex || 0;
|
|
||||||
var string = value[0];
|
|
||||||
var altString, altValue;
|
|
||||||
var matched = false;
|
|
||||||
var matchIndex = -1;
|
|
||||||
function testCriteria(criterion, index) {
|
|
||||||
var result;
|
|
||||||
switch (Object.prototype.toString.call(criterion)) {
|
|
||||||
case '[object String]':
|
|
||||||
result = string === criterion || altString && altString === criterion;
|
|
||||||
result = result || micromatch.isMatch(string, criterion);
|
|
||||||
break;
|
|
||||||
case '[object RegExp]':
|
|
||||||
result = criterion.test(string) || altString && criterion.test(altString);
|
|
||||||
break;
|
|
||||||
case '[object Function]':
|
|
||||||
result = criterion.apply(null, value);
|
|
||||||
result = result || altValue && criterion.apply(null, altValue);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
result = false;
|
|
||||||
}
|
|
||||||
if (result) {
|
|
||||||
matchIndex = index + startIndex;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
var crit = criteria;
|
|
||||||
var negGlobs = crit.reduce(function(arr, criterion, index) {
|
|
||||||
if (typeof criterion === 'string' && criterion[0] === '!') {
|
|
||||||
if (crit === criteria) {
|
|
||||||
// make a copy before modifying
|
|
||||||
crit = crit.slice();
|
|
||||||
}
|
|
||||||
crit[index] = null;
|
|
||||||
arr.push(criterion.substr(1));
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
}, []);
|
|
||||||
if (!negGlobs.length || !micromatch.any(string, negGlobs)) {
|
|
||||||
if (path.sep === '\\' && typeof string === 'string') {
|
|
||||||
altString = normalize(string);
|
|
||||||
altString = altString === string ? null : altString;
|
|
||||||
if (altString) altValue = [altString].concat(value.slice(1));
|
|
||||||
}
|
|
||||||
matched = crit.slice(startIndex, endIndex).some(testCriteria);
|
|
||||||
}
|
|
||||||
return returnIndex === true ? matchIndex : matched;
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = anymatch;
|
|
21
node_modules/anymatch/node_modules/normalize-path/LICENSE
generated
vendored
21
node_modules/anymatch/node_modules/normalize-path/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2017, Jon Schlinkert
|
|
||||||
|
|
||||||
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.
|
|
92
node_modules/anymatch/node_modules/normalize-path/README.md
generated
vendored
92
node_modules/anymatch/node_modules/normalize-path/README.md
generated
vendored
@ -1,92 +0,0 @@
|
|||||||
# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path)
|
|
||||||
|
|
||||||
> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save normalize-path
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var normalize = require('normalize-path');
|
|
||||||
|
|
||||||
normalize('\\foo\\bar\\baz\\');
|
|
||||||
//=> '/foo/bar/baz'
|
|
||||||
|
|
||||||
normalize('./foo/bar/baz/');
|
|
||||||
//=> './foo/bar/baz'
|
|
||||||
```
|
|
||||||
|
|
||||||
Pass `false` as the last argument to **keep** trailing slashes:
|
|
||||||
|
|
||||||
```js
|
|
||||||
normalize('./foo/bar/baz/', false);
|
|
||||||
//=> './foo/bar/baz/'
|
|
||||||
|
|
||||||
normalize('foo\\bar\\baz\\', false);
|
|
||||||
//=> 'foo/bar/baz/'
|
|
||||||
```
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.")
|
|
||||||
* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with "Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.")
|
|
||||||
* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.")
|
|
||||||
* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.")
|
|
||||||
* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.")
|
|
||||||
* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.")
|
|
||||||
* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments "Get n specific segments of a file path, e.g. first 2, last 3, etc.")
|
|
||||||
* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g… [more](https://github.com/jonschlinkert/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext "Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.")
|
|
||||||
* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.")
|
|
||||||
|
|
||||||
### Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
|
|
||||||
| **Commits** | **Contributor** |
|
|
||||||
| --- | --- |
|
|
||||||
| 31 | [jonschlinkert](https://github.com/jonschlinkert) |
|
|
||||||
| 1 | [phated](https://github.com/phated) |
|
|
||||||
|
|
||||||
### Building docs
|
|
||||||
|
|
||||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
||||||
|
|
||||||
To generate the readme, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running tests
|
|
||||||
|
|
||||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT License](LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._
|
|
19
node_modules/anymatch/node_modules/normalize-path/index.js
generated
vendored
19
node_modules/anymatch/node_modules/normalize-path/index.js
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
/*!
|
|
||||||
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var removeTrailingSeparator = require('remove-trailing-separator');
|
|
||||||
|
|
||||||
module.exports = function normalizePath(str, stripTrailing) {
|
|
||||||
if (typeof str !== 'string') {
|
|
||||||
throw new TypeError('expected a string');
|
|
||||||
}
|
|
||||||
str = str.replace(/[\\\/]+/g, '/');
|
|
||||||
if (stripTrailing !== false) {
|
|
||||||
str = removeTrailingSeparator(str);
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
117
node_modules/anymatch/node_modules/normalize-path/package.json
generated
vendored
117
node_modules/anymatch/node_modules/normalize-path/package.json
generated
vendored
@ -1,117 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "normalize-path@^2.1.1",
|
|
||||||
"_id": "normalize-path@2.1.1",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
|
|
||||||
"_location": "/anymatch/normalize-path",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "normalize-path@^2.1.1",
|
|
||||||
"name": "normalize-path",
|
|
||||||
"escapedName": "normalize-path",
|
|
||||||
"rawSpec": "^2.1.1",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^2.1.1"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/anymatch"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
|
|
||||||
"_shasum": "1ab28b556e198363a8c1a6f7e6fa20137fe6aed9",
|
|
||||||
"_spec": "normalize-path@^2.1.1",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\anymatch",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/normalize-path/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Blaine Bublitz",
|
|
||||||
"email": "blaine.bublitz@gmail.com",
|
|
||||||
"url": "https://twitter.com/BlaineBublitz"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"email": "jon.schlinkert@sellside.com",
|
|
||||||
"url": "http://twitter.com/jonschlinkert"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"remove-trailing-separator": "^1.0.1"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.",
|
|
||||||
"devDependencies": {
|
|
||||||
"benchmarked": "^0.1.1",
|
|
||||||
"gulp-format-md": "^0.1.11",
|
|
||||||
"minimist": "^1.2.0",
|
|
||||||
"mocha": "*"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/normalize-path",
|
|
||||||
"keywords": [
|
|
||||||
"backslash",
|
|
||||||
"file",
|
|
||||||
"filepath",
|
|
||||||
"fix",
|
|
||||||
"forward",
|
|
||||||
"fp",
|
|
||||||
"fs",
|
|
||||||
"normalize",
|
|
||||||
"path",
|
|
||||||
"slash",
|
|
||||||
"slashes",
|
|
||||||
"trailing",
|
|
||||||
"unix",
|
|
||||||
"urix"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "normalize-path",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/normalize-path.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"contains-path",
|
|
||||||
"ends-with",
|
|
||||||
"is-absolute",
|
|
||||||
"is-relative",
|
|
||||||
"parse-filepath",
|
|
||||||
"path-ends-with",
|
|
||||||
"path-segments",
|
|
||||||
"rewrite-ext",
|
|
||||||
"unixify"
|
|
||||||
],
|
|
||||||
"description": "Other useful libraries for working with paths in node.js:"
|
|
||||||
},
|
|
||||||
"toc": false,
|
|
||||||
"layout": "default",
|
|
||||||
"tasks": [
|
|
||||||
"readme"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"gulp-format-md"
|
|
||||||
],
|
|
||||||
"lint": {
|
|
||||||
"reflinks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "2.1.1"
|
|
||||||
}
|
|
75
node_modules/anymatch/package.json
generated
vendored
75
node_modules/anymatch/package.json
generated
vendored
@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "anymatch@^2.0.0",
|
|
||||||
"_id": "anymatch@2.0.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
|
|
||||||
"_location": "/anymatch",
|
|
||||||
"_phantomChildren": {
|
|
||||||
"remove-trailing-separator": "1.1.0"
|
|
||||||
},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "anymatch@^2.0.0",
|
|
||||||
"name": "anymatch",
|
|
||||||
"escapedName": "anymatch",
|
|
||||||
"rawSpec": "^2.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^2.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/chokidar",
|
|
||||||
"/watchify"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
|
|
||||||
"_shasum": "bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb",
|
|
||||||
"_spec": "anymatch@^2.0.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\chokidar",
|
|
||||||
"author": {
|
|
||||||
"name": "Elan Shanker",
|
|
||||||
"url": "http://github.com/es128"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/micromatch/anymatch/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {
|
|
||||||
"micromatch": "^3.1.4",
|
|
||||||
"normalize-path": "^2.1.1"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Matches strings against configurable strings, globs, regular expressions, and/or functions",
|
|
||||||
"devDependencies": {
|
|
||||||
"coveralls": "^2.7.0",
|
|
||||||
"istanbul": "^0.4.5",
|
|
||||||
"mocha": "^3.0.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/micromatch/anymatch",
|
|
||||||
"keywords": [
|
|
||||||
"match",
|
|
||||||
"any",
|
|
||||||
"string",
|
|
||||||
"file",
|
|
||||||
"fs",
|
|
||||||
"list",
|
|
||||||
"glob",
|
|
||||||
"regex",
|
|
||||||
"regexp",
|
|
||||||
"regular",
|
|
||||||
"expression",
|
|
||||||
"function"
|
|
||||||
],
|
|
||||||
"license": "ISC",
|
|
||||||
"name": "anymatch",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/micromatch/anymatch.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
|
|
||||||
},
|
|
||||||
"version": "2.0.0"
|
|
||||||
}
|
|
21
node_modules/arr-diff/LICENSE
generated
vendored
21
node_modules/arr-diff/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2017, Jon Schlinkert
|
|
||||||
|
|
||||||
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.
|
|
130
node_modules/arr-diff/README.md
generated
vendored
130
node_modules/arr-diff/README.md
generated
vendored
@ -1,130 +0,0 @@
|
|||||||
# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg?style=flat)](https://www.npmjs.com/package/arr-diff) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-diff.svg?style=flat)](https://npmjs.org/package/arr-diff) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-diff.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-diff)
|
|
||||||
|
|
||||||
> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save arr-diff
|
|
||||||
```
|
|
||||||
|
|
||||||
Install with [yarn](https://yarnpkg.com):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ yarn add arr-diff
|
|
||||||
```
|
|
||||||
|
|
||||||
Install with [bower](https://bower.io/)
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ bower install arr-diff --save
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Returns the difference between the first array and additional arrays.
|
|
||||||
|
|
||||||
```js
|
|
||||||
var diff = require('arr-diff');
|
|
||||||
|
|
||||||
var a = ['a', 'b', 'c', 'd'];
|
|
||||||
var b = ['b', 'c'];
|
|
||||||
|
|
||||||
console.log(diff(a, b))
|
|
||||||
//=> ['a', 'd']
|
|
||||||
```
|
|
||||||
|
|
||||||
## Benchmarks
|
|
||||||
|
|
||||||
This library versus [array-differ](https://github.com/sindresorhus/array-differ), on April 14, 2017:
|
|
||||||
|
|
||||||
```
|
|
||||||
Benchmarking: (4 of 4)
|
|
||||||
· long-dupes
|
|
||||||
· long
|
|
||||||
· med
|
|
||||||
· short
|
|
||||||
|
|
||||||
# benchmark/fixtures/long-dupes.js (100804 bytes)
|
|
||||||
arr-diff-3.0.0 x 822 ops/sec ±0.67% (86 runs sampled)
|
|
||||||
arr-diff-4.0.0 x 2,141 ops/sec ±0.42% (89 runs sampled)
|
|
||||||
array-differ x 708 ops/sec ±0.70% (89 runs sampled)
|
|
||||||
|
|
||||||
fastest is arr-diff-4.0.0
|
|
||||||
|
|
||||||
# benchmark/fixtures/long.js (94529 bytes)
|
|
||||||
arr-diff-3.0.0 x 882 ops/sec ±0.60% (87 runs sampled)
|
|
||||||
arr-diff-4.0.0 x 2,329 ops/sec ±0.97% (83 runs sampled)
|
|
||||||
array-differ x 769 ops/sec ±0.61% (90 runs sampled)
|
|
||||||
|
|
||||||
fastest is arr-diff-4.0.0
|
|
||||||
|
|
||||||
# benchmark/fixtures/med.js (708 bytes)
|
|
||||||
arr-diff-3.0.0 x 856,150 ops/sec ±0.42% (89 runs sampled)
|
|
||||||
arr-diff-4.0.0 x 4,665,249 ops/sec ±1.06% (89 runs sampled)
|
|
||||||
array-differ x 653,888 ops/sec ±1.02% (86 runs sampled)
|
|
||||||
|
|
||||||
fastest is arr-diff-4.0.0
|
|
||||||
|
|
||||||
# benchmark/fixtures/short.js (60 bytes)
|
|
||||||
arr-diff-3.0.0 x 3,078,467 ops/sec ±0.77% (93 runs sampled)
|
|
||||||
arr-diff-4.0.0 x 9,213,296 ops/sec ±0.65% (89 runs sampled)
|
|
||||||
array-differ x 1,337,051 ops/sec ±0.91% (92 runs sampled)
|
|
||||||
|
|
||||||
fastest is arr-diff-4.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
|
|
||||||
* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter "Array#filter for older browsers.")
|
|
||||||
* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://github.com/jonschlinkert/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection "Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.")
|
|
||||||
|
|
||||||
### Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
|
|
||||||
| **Commits** | **Contributor** |
|
|
||||||
| --- | --- |
|
|
||||||
| 33 | [jonschlinkert](https://github.com/jonschlinkert) |
|
|
||||||
| 2 | [paulmillr](https://github.com/paulmillr) |
|
|
||||||
|
|
||||||
### Building docs
|
|
||||||
|
|
||||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
||||||
|
|
||||||
To generate the readme, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running tests
|
|
||||||
|
|
||||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT License](LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._
|
|
47
node_modules/arr-diff/index.js
generated
vendored
47
node_modules/arr-diff/index.js
generated
vendored
@ -1,47 +0,0 @@
|
|||||||
/*!
|
|
||||||
* arr-diff <https://github.com/jonschlinkert/arr-diff>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function diff(arr/*, arrays*/) {
|
|
||||||
var len = arguments.length;
|
|
||||||
var idx = 0;
|
|
||||||
while (++idx < len) {
|
|
||||||
arr = diffArray(arr, arguments[idx]);
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
};
|
|
||||||
|
|
||||||
function diffArray(one, two) {
|
|
||||||
if (!Array.isArray(two)) {
|
|
||||||
return one.slice();
|
|
||||||
}
|
|
||||||
|
|
||||||
var tlen = two.length
|
|
||||||
var olen = one.length;
|
|
||||||
var idx = -1;
|
|
||||||
var arr = [];
|
|
||||||
|
|
||||||
while (++idx < olen) {
|
|
||||||
var ele = one[idx];
|
|
||||||
|
|
||||||
var hasEle = false;
|
|
||||||
for (var i = 0; i < tlen; i++) {
|
|
||||||
var val = two[i];
|
|
||||||
|
|
||||||
if (ele === val) {
|
|
||||||
hasEle = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasEle === false) {
|
|
||||||
arr.push(ele);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
}
|
|
109
node_modules/arr-diff/package.json
generated
vendored
109
node_modules/arr-diff/package.json
generated
vendored
@ -1,109 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "arr-diff@^4.0.0",
|
|
||||||
"_id": "arr-diff@4.0.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
|
|
||||||
"_location": "/arr-diff",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "arr-diff@^4.0.0",
|
|
||||||
"name": "arr-diff",
|
|
||||||
"escapedName": "arr-diff",
|
|
||||||
"rawSpec": "^4.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^4.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/micromatch",
|
|
||||||
"/nanomatch"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
|
|
||||||
"_shasum": "d6461074febfec71e7e15235761a329a5dc7c520",
|
|
||||||
"_spec": "arr-diff@^4.0.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\micromatch",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/arr-diff/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"email": "jon.schlinkert@sellside.com",
|
|
||||||
"url": "http://twitter.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Paul Miller",
|
|
||||||
"email": "paul+gh@paulmillr.com",
|
|
||||||
"url": "paulmillr.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"dependencies": {},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.",
|
|
||||||
"devDependencies": {
|
|
||||||
"ansi-bold": "^0.1.1",
|
|
||||||
"arr-flatten": "^1.0.1",
|
|
||||||
"array-differ": "^1.0.0",
|
|
||||||
"benchmarked": "^0.2.4",
|
|
||||||
"gulp-format-md": "^0.1.9",
|
|
||||||
"minimist": "^1.2.0",
|
|
||||||
"mocha": "^2.4.5"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/arr-diff",
|
|
||||||
"keywords": [
|
|
||||||
"arr",
|
|
||||||
"array",
|
|
||||||
"array differ",
|
|
||||||
"array-differ",
|
|
||||||
"diff",
|
|
||||||
"differ",
|
|
||||||
"difference"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "arr-diff",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/arr-diff.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"toc": false,
|
|
||||||
"layout": "default",
|
|
||||||
"tasks": [
|
|
||||||
"readme"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"gulp-format-md"
|
|
||||||
],
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"arr-flatten",
|
|
||||||
"array-filter",
|
|
||||||
"array-intersection"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"reflinks": [
|
|
||||||
"array-differ",
|
|
||||||
"verb"
|
|
||||||
],
|
|
||||||
"lint": {
|
|
||||||
"reflinks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "4.0.0"
|
|
||||||
}
|
|
21
node_modules/arr-flatten/LICENSE
generated
vendored
21
node_modules/arr-flatten/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
|
||||||
|
|
||||||
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.
|
|
86
node_modules/arr-flatten/README.md
generated
vendored
86
node_modules/arr-flatten/README.md
generated
vendored
@ -1,86 +0,0 @@
|
|||||||
# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![NPM total downloads](https://img.shields.io/npm/dt/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten)
|
|
||||||
|
|
||||||
> Recursively flatten an array or arrays.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save arr-flatten
|
|
||||||
```
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [bower](https://bower.io/)
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ bower install arr-flatten --save
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var flatten = require('arr-flatten');
|
|
||||||
|
|
||||||
flatten(['a', ['b', ['c']], 'd', ['e']]);
|
|
||||||
//=> ['a', 'b', 'c', 'd', 'e']
|
|
||||||
```
|
|
||||||
|
|
||||||
## Why another flatten utility?
|
|
||||||
|
|
||||||
I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%.
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.")
|
|
||||||
* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.")
|
|
||||||
* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.")
|
|
||||||
* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.")
|
|
||||||
|
|
||||||
### Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
|
|
||||||
| **Commits** | **Contributor** |
|
|
||||||
| --- | --- |
|
|
||||||
| 20 | [jonschlinkert](https://github.com/jonschlinkert) |
|
|
||||||
| 1 | [lukeed](https://github.com/lukeed) |
|
|
||||||
|
|
||||||
### Building docs
|
|
||||||
|
|
||||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
||||||
|
|
||||||
To generate the readme, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running tests
|
|
||||||
|
|
||||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT License](LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._
|
|
22
node_modules/arr-flatten/index.js
generated
vendored
22
node_modules/arr-flatten/index.js
generated
vendored
@ -1,22 +0,0 @@
|
|||||||
/*!
|
|
||||||
* arr-flatten <https://github.com/jonschlinkert/arr-flatten>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function (arr) {
|
|
||||||
return flat(arr, []);
|
|
||||||
};
|
|
||||||
|
|
||||||
function flat(arr, res) {
|
|
||||||
var i = 0, cur;
|
|
||||||
var len = arr.length;
|
|
||||||
for (; i < len; i++) {
|
|
||||||
cur = arr[i];
|
|
||||||
Array.isArray(cur) ? flat(cur, res) : res.push(cur);
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
113
node_modules/arr-flatten/package.json
generated
vendored
113
node_modules/arr-flatten/package.json
generated
vendored
@ -1,113 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "arr-flatten@^1.1.0",
|
|
||||||
"_id": "arr-flatten@1.1.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
|
|
||||||
"_location": "/arr-flatten",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "arr-flatten@^1.1.0",
|
|
||||||
"name": "arr-flatten",
|
|
||||||
"escapedName": "arr-flatten",
|
|
||||||
"rawSpec": "^1.1.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.1.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/braces"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
|
|
||||||
"_shasum": "36048bbff4e7b47e136644316c99669ea5ae91f1",
|
|
||||||
"_spec": "arr-flatten@^1.1.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\braces",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/arr-flatten/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "http://twitter.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Luke Edwards",
|
|
||||||
"url": "https://lukeed.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Recursively flatten an array or arrays.",
|
|
||||||
"devDependencies": {
|
|
||||||
"ansi-bold": "^0.1.1",
|
|
||||||
"array-flatten": "^2.1.1",
|
|
||||||
"array-slice": "^1.0.0",
|
|
||||||
"benchmarked": "^1.0.0",
|
|
||||||
"compute-flatten": "^1.0.0",
|
|
||||||
"flatit": "^1.1.1",
|
|
||||||
"flatten": "^1.0.2",
|
|
||||||
"flatten-array": "^1.0.0",
|
|
||||||
"glob": "^7.1.1",
|
|
||||||
"gulp-format-md": "^0.1.12",
|
|
||||||
"just-flatten-it": "^1.1.23",
|
|
||||||
"lodash.flattendeep": "^4.4.0",
|
|
||||||
"m_flattened": "^1.0.1",
|
|
||||||
"mocha": "^3.2.0",
|
|
||||||
"utils-flatten": "^1.0.0",
|
|
||||||
"write": "^0.3.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/arr-flatten",
|
|
||||||
"keywords": [
|
|
||||||
"arr",
|
|
||||||
"array",
|
|
||||||
"elements",
|
|
||||||
"flat",
|
|
||||||
"flatten",
|
|
||||||
"nested",
|
|
||||||
"recurse",
|
|
||||||
"recursive",
|
|
||||||
"recursively"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "arr-flatten",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/arr-flatten.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"toc": false,
|
|
||||||
"layout": "default",
|
|
||||||
"tasks": [
|
|
||||||
"readme"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"gulp-format-md"
|
|
||||||
],
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"arr-filter",
|
|
||||||
"arr-union",
|
|
||||||
"array-each",
|
|
||||||
"array-unique"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"reflinks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "1.1.0"
|
|
||||||
}
|
|
21
node_modules/arr-union/LICENSE
generated
vendored
21
node_modules/arr-union/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2016, Jon Schlinkert.
|
|
||||||
|
|
||||||
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.
|
|
99
node_modules/arr-union/README.md
generated
vendored
99
node_modules/arr-union/README.md
generated
vendored
@ -1,99 +0,0 @@
|
|||||||
# arr-union [![NPM version](https://img.shields.io/npm/v/arr-union.svg)](https://www.npmjs.com/package/arr-union) [![Build Status](https://img.shields.io/travis/jonschlinkert/arr-union.svg)](https://travis-ci.org/jonschlinkert/arr-union)
|
|
||||||
|
|
||||||
> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm i arr-union --save
|
|
||||||
```
|
|
||||||
|
|
||||||
## Benchmarks
|
|
||||||
|
|
||||||
This library is **10-20 times faster** and more performant than [array-union](https://github.com/sindresorhus/array-union).
|
|
||||||
|
|
||||||
See the [benchmarks](./benchmark).
|
|
||||||
|
|
||||||
```sh
|
|
||||||
#1: five-arrays
|
|
||||||
array-union x 511,121 ops/sec ±0.80% (96 runs sampled)
|
|
||||||
arr-union x 5,716,039 ops/sec ±0.86% (93 runs sampled)
|
|
||||||
|
|
||||||
#2: ten-arrays
|
|
||||||
array-union x 245,196 ops/sec ±0.69% (94 runs sampled)
|
|
||||||
arr-union x 1,850,786 ops/sec ±0.84% (97 runs sampled)
|
|
||||||
|
|
||||||
#3: two-arrays
|
|
||||||
array-union x 563,869 ops/sec ±0.97% (94 runs sampled)
|
|
||||||
arr-union x 9,602,852 ops/sec ±0.87% (92 runs sampled)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var union = require('arr-union');
|
|
||||||
|
|
||||||
union(['a'], ['b', 'c'], ['d', 'e', 'f']);
|
|
||||||
//=> ['a', 'b', 'c', 'd', 'e', 'f']
|
|
||||||
```
|
|
||||||
|
|
||||||
Returns only unique elements:
|
|
||||||
|
|
||||||
```js
|
|
||||||
union(['a', 'a'], ['b', 'c']);
|
|
||||||
//=> ['a', 'b', 'c']
|
|
||||||
```
|
|
||||||
|
|
||||||
## Related projects
|
|
||||||
|
|
||||||
* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://www.npmjs.com/package/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff)
|
|
||||||
* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter)
|
|
||||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten)
|
|
||||||
* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map)
|
|
||||||
* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck)
|
|
||||||
* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce)
|
|
||||||
* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique)
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-union/issues/new).
|
|
||||||
|
|
||||||
## Building docs
|
|
||||||
|
|
||||||
Generate readme and API documentation with [verb](https://github.com/verbose/verb):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm i verb && npm run docs
|
|
||||||
```
|
|
||||||
|
|
||||||
Or, if [verb](https://github.com/verbose/verb) is installed globally:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ verb
|
|
||||||
```
|
|
||||||
|
|
||||||
## Running tests
|
|
||||||
|
|
||||||
Install dev dependencies:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm i -d && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)
|
|
||||||
Released under the [MIT license](https://github.com/jonschlinkert/arr-union/blob/master/LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 23, 2016._
|
|
29
node_modules/arr-union/index.js
generated
vendored
29
node_modules/arr-union/index.js
generated
vendored
@ -1,29 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function union(init) {
|
|
||||||
if (!Array.isArray(init)) {
|
|
||||||
throw new TypeError('arr-union expects the first argument to be an array.');
|
|
||||||
}
|
|
||||||
|
|
||||||
var len = arguments.length;
|
|
||||||
var i = 0;
|
|
||||||
|
|
||||||
while (++i < len) {
|
|
||||||
var arg = arguments[i];
|
|
||||||
if (!arg) continue;
|
|
||||||
|
|
||||||
if (!Array.isArray(arg)) {
|
|
||||||
arg = [arg];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var j = 0; j < arg.length; j++) {
|
|
||||||
var ele = arg[j];
|
|
||||||
|
|
||||||
if (init.indexOf(ele) >= 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
init.push(ele);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return init;
|
|
||||||
};
|
|
108
node_modules/arr-union/package.json
generated
vendored
108
node_modules/arr-union/package.json
generated
vendored
@ -1,108 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "arr-union@^3.1.0",
|
|
||||||
"_id": "arr-union@3.1.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
|
|
||||||
"_location": "/arr-union",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "arr-union@^3.1.0",
|
|
||||||
"name": "arr-union",
|
|
||||||
"escapedName": "arr-union",
|
|
||||||
"rawSpec": "^3.1.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^3.1.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/class-utils",
|
|
||||||
"/union-value"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
|
|
||||||
"_shasum": "e39b09aea9def866a8f206e288af63919bae39c4",
|
|
||||||
"_spec": "arr-union@^3.1.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\union-value",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/arr-union/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.",
|
|
||||||
"devDependencies": {
|
|
||||||
"ansi-bold": "^0.1.1",
|
|
||||||
"array-union": "^1.0.1",
|
|
||||||
"array-unique": "^0.2.1",
|
|
||||||
"benchmarked": "^0.1.4",
|
|
||||||
"gulp-format-md": "^0.1.7",
|
|
||||||
"minimist": "^1.1.1",
|
|
||||||
"mocha": "*",
|
|
||||||
"should": "*"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/arr-union",
|
|
||||||
"keywords": [
|
|
||||||
"add",
|
|
||||||
"append",
|
|
||||||
"array",
|
|
||||||
"arrays",
|
|
||||||
"combine",
|
|
||||||
"concat",
|
|
||||||
"extend",
|
|
||||||
"union",
|
|
||||||
"uniq",
|
|
||||||
"unique",
|
|
||||||
"util",
|
|
||||||
"utility",
|
|
||||||
"utils"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "arr-union",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/arr-union.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"run": true,
|
|
||||||
"toc": false,
|
|
||||||
"layout": "default",
|
|
||||||
"tasks": [
|
|
||||||
"readme"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"gulp-format-md"
|
|
||||||
],
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"arr-diff",
|
|
||||||
"arr-flatten",
|
|
||||||
"arr-filter",
|
|
||||||
"arr-map",
|
|
||||||
"arr-pluck",
|
|
||||||
"arr-reduce",
|
|
||||||
"array-unique"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"reflinks": [
|
|
||||||
"verb",
|
|
||||||
"array-union"
|
|
||||||
],
|
|
||||||
"lint": {
|
|
||||||
"reflinks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "3.1.0"
|
|
||||||
}
|
|
21
node_modules/array-unique/LICENSE
generated
vendored
21
node_modules/array-unique/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2016, Jon Schlinkert
|
|
||||||
|
|
||||||
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.
|
|
77
node_modules/array-unique/README.md
generated
vendored
77
node_modules/array-unique/README.md
generated
vendored
@ -1,77 +0,0 @@
|
|||||||
# array-unique [![NPM version](https://img.shields.io/npm/v/array-unique.svg?style=flat)](https://www.npmjs.com/package/array-unique) [![NPM downloads](https://img.shields.io/npm/dm/array-unique.svg?style=flat)](https://npmjs.org/package/array-unique) [![Build Status](https://img.shields.io/travis/jonschlinkert/array-unique.svg?style=flat)](https://travis-ci.org/jonschlinkert/array-unique)
|
|
||||||
|
|
||||||
Remove duplicate values from an array. Fastest ES5 implementation.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save array-unique
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var unique = require('array-unique');
|
|
||||||
|
|
||||||
var arr = ['a', 'b', 'c', 'c'];
|
|
||||||
console.log(unique(arr)) //=> ['a', 'b', 'c']
|
|
||||||
console.log(arr) //=> ['a', 'b', 'c']
|
|
||||||
|
|
||||||
/* The above modifies the input array. To prevent that at a slight performance cost: */
|
|
||||||
var unique = require("array-unique").immutable;
|
|
||||||
|
|
||||||
var arr = ['a', 'b', 'c', 'c'];
|
|
||||||
console.log(unique(arr)) //=> ['a', 'b', 'c']
|
|
||||||
console.log(arr) //=> ['a', 'b', 'c', 'c']
|
|
||||||
```
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.")
|
|
||||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
|
|
||||||
* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.")
|
|
||||||
* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck "Retrieves the value of a specified property from all elements in the collection.")
|
|
||||||
* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.")
|
|
||||||
* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.")
|
|
||||||
|
|
||||||
### Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
### Building docs
|
|
||||||
|
|
||||||
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
|
|
||||||
|
|
||||||
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verb verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running tests
|
|
||||||
|
|
||||||
Install dev dependencies:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -d && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT license](https://github.com/jonschlinkert/array-unique/blob/master/LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 31, 2016._
|
|
43
node_modules/array-unique/index.js
generated
vendored
43
node_modules/array-unique/index.js
generated
vendored
@ -1,43 +0,0 @@
|
|||||||
/*!
|
|
||||||
* array-unique <https://github.com/jonschlinkert/array-unique>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function unique(arr) {
|
|
||||||
if (!Array.isArray(arr)) {
|
|
||||||
throw new TypeError('array-unique expects an array.');
|
|
||||||
}
|
|
||||||
|
|
||||||
var len = arr.length;
|
|
||||||
var i = -1;
|
|
||||||
|
|
||||||
while (i++ < len) {
|
|
||||||
var j = i + 1;
|
|
||||||
|
|
||||||
for (; j < arr.length; ++j) {
|
|
||||||
if (arr[i] === arr[j]) {
|
|
||||||
arr.splice(j--, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports.immutable = function uniqueImmutable(arr) {
|
|
||||||
if (!Array.isArray(arr)) {
|
|
||||||
throw new TypeError('array-unique expects an array.');
|
|
||||||
}
|
|
||||||
|
|
||||||
var arrLen = arr.length;
|
|
||||||
var newArr = new Array(arrLen);
|
|
||||||
|
|
||||||
for (var i = 0; i < arrLen; i++) {
|
|
||||||
newArr[i] = arr[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return module.exports(newArr);
|
|
||||||
};
|
|
96
node_modules/array-unique/package.json
generated
vendored
96
node_modules/array-unique/package.json
generated
vendored
@ -1,96 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "array-unique@^0.3.2",
|
|
||||||
"_id": "array-unique@0.3.2",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
|
|
||||||
"_location": "/array-unique",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "array-unique@^0.3.2",
|
|
||||||
"name": "array-unique",
|
|
||||||
"escapedName": "array-unique",
|
|
||||||
"rawSpec": "^0.3.2",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^0.3.2"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/braces",
|
|
||||||
"/extglob",
|
|
||||||
"/micromatch",
|
|
||||||
"/nanomatch"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
|
|
||||||
"_shasum": "a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428",
|
|
||||||
"_spec": "array-unique@^0.3.2",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\micromatch",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/array-unique/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Remove duplicate values from an array. Fastest ES5 implementation.",
|
|
||||||
"devDependencies": {
|
|
||||||
"array-uniq": "^1.0.2",
|
|
||||||
"benchmarked": "^0.1.3",
|
|
||||||
"gulp-format-md": "^0.1.9",
|
|
||||||
"mocha": "^2.5.3",
|
|
||||||
"should": "^10.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js",
|
|
||||||
"LICENSE",
|
|
||||||
"README.md"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/array-unique",
|
|
||||||
"keywords": [
|
|
||||||
"array",
|
|
||||||
"unique"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "array-unique",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/array-unique.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"toc": false,
|
|
||||||
"layout": "default",
|
|
||||||
"tasks": [
|
|
||||||
"readme"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"gulp-format-md"
|
|
||||||
],
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"arr-diff",
|
|
||||||
"arr-union",
|
|
||||||
"arr-flatten",
|
|
||||||
"arr-reduce",
|
|
||||||
"arr-map",
|
|
||||||
"arr-pluck"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"reflinks": [
|
|
||||||
"verb",
|
|
||||||
"verb-generate-readme"
|
|
||||||
],
|
|
||||||
"lint": {
|
|
||||||
"reflinks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "0.3.2"
|
|
||||||
}
|
|
21
node_modules/assign-symbols/LICENSE
generated
vendored
21
node_modules/assign-symbols/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015, Jon Schlinkert.
|
|
||||||
|
|
||||||
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.
|
|
73
node_modules/assign-symbols/README.md
generated
vendored
73
node_modules/assign-symbols/README.md
generated
vendored
@ -1,73 +0,0 @@
|
|||||||
# assign-symbols [![NPM version](https://badge.fury.io/js/assign-symbols.svg)](http://badge.fury.io/js/assign-symbols)
|
|
||||||
|
|
||||||
> Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.
|
|
||||||
|
|
||||||
From the [Mozilla Developer docs for Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol):
|
|
||||||
|
|
||||||
> A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/)
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm i assign-symbols --save
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var assignSymbols = require('assign-symbols');
|
|
||||||
var obj = {};
|
|
||||||
|
|
||||||
var one = {};
|
|
||||||
var symbolOne = Symbol('aaa');
|
|
||||||
one[symbolOne] = 'bbb';
|
|
||||||
|
|
||||||
var two = {};
|
|
||||||
var symbolTwo = Symbol('ccc');
|
|
||||||
two[symbolTwo] = 'ddd';
|
|
||||||
|
|
||||||
assignSymbols(obj, one, two);
|
|
||||||
|
|
||||||
console.log(obj[symbolOne]);
|
|
||||||
//=> 'bbb'
|
|
||||||
console.log(obj[symbolTwo]);
|
|
||||||
//=> 'ddd'
|
|
||||||
```
|
|
||||||
|
|
||||||
## Similar projects
|
|
||||||
|
|
||||||
* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. | [homepage](https://github.com/jonschlinkert/assign-deep)
|
|
||||||
* [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep)
|
|
||||||
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow)
|
|
||||||
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep)
|
|
||||||
* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep)
|
|
||||||
|
|
||||||
## Running tests
|
|
||||||
|
|
||||||
Install dev dependencies:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm i -d && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-symbols/issues/new).
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Copyright © 2015 Jon Schlinkert
|
|
||||||
Released under the MIT license.
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 06, 2015._
|
|
40
node_modules/assign-symbols/index.js
generated
vendored
40
node_modules/assign-symbols/index.js
generated
vendored
@ -1,40 +0,0 @@
|
|||||||
/*!
|
|
||||||
* assign-symbols <https://github.com/jonschlinkert/assign-symbols>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2015, Jon Schlinkert.
|
|
||||||
* Licensed under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function(receiver, objects) {
|
|
||||||
if (receiver === null || typeof receiver === 'undefined') {
|
|
||||||
throw new TypeError('expected first argument to be an object.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof objects === 'undefined' || typeof Symbol === 'undefined') {
|
|
||||||
return receiver;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof Object.getOwnPropertySymbols !== 'function') {
|
|
||||||
return receiver;
|
|
||||||
}
|
|
||||||
|
|
||||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
||||||
var target = Object(receiver);
|
|
||||||
var len = arguments.length, i = 0;
|
|
||||||
|
|
||||||
while (++i < len) {
|
|
||||||
var provider = Object(arguments[i]);
|
|
||||||
var names = Object.getOwnPropertySymbols(provider);
|
|
||||||
|
|
||||||
for (var j = 0; j < names.length; j++) {
|
|
||||||
var key = names[j];
|
|
||||||
|
|
||||||
if (isEnumerable.call(provider, key)) {
|
|
||||||
target[key] = provider[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return target;
|
|
||||||
};
|
|
71
node_modules/assign-symbols/package.json
generated
vendored
71
node_modules/assign-symbols/package.json
generated
vendored
@ -1,71 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "assign-symbols@^1.0.0",
|
|
||||||
"_id": "assign-symbols@1.0.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
|
|
||||||
"_location": "/assign-symbols",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "assign-symbols@^1.0.0",
|
|
||||||
"name": "assign-symbols",
|
|
||||||
"escapedName": "assign-symbols",
|
|
||||||
"rawSpec": "^1.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/extend-shallow"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
|
|
||||||
"_shasum": "59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367",
|
|
||||||
"_spec": "assign-symbols@^1.0.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\extend-shallow",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/assign-symbols/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.",
|
|
||||||
"devDependencies": {
|
|
||||||
"mocha": "^3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/assign-symbols",
|
|
||||||
"keywords": [
|
|
||||||
"assign",
|
|
||||||
"symbols"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "assign-symbols",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/assign-symbols.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"assign-deep",
|
|
||||||
"mixin-deep",
|
|
||||||
"merge-deep",
|
|
||||||
"extend-shallow",
|
|
||||||
"clone-deep"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "1.0.0"
|
|
||||||
}
|
|
52
node_modules/async-each/README.md
generated
vendored
52
node_modules/async-each/README.md
generated
vendored
@ -1,52 +0,0 @@
|
|||||||
# async-each
|
|
||||||
|
|
||||||
No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach function for JavaScript.
|
|
||||||
|
|
||||||
We don't need junky 30K async libs. Really.
|
|
||||||
|
|
||||||
For browsers and node.js.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
* Just include async-each before your scripts.
|
|
||||||
* `npm install async-each` if you’re using node.js.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
* `each(array, iterator, callback);` — `Array`, `Function`, `(optional) Function`
|
|
||||||
* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments.
|
|
||||||
* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
var each = require('async-each');
|
|
||||||
each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) {
|
|
||||||
if (error) console.error(error);
|
|
||||||
console.log('Contents for a, b and c:', contents);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Alternatively in browser:
|
|
||||||
asyncEach(list, fn, callback);
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016 Paul Miller [(paulmillr.com)](http://paulmillr.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.
|
|
38
node_modules/async-each/index.js
generated
vendored
38
node_modules/async-each/index.js
generated
vendored
@ -1,38 +0,0 @@
|
|||||||
// async-each MIT license (by Paul Miller from https://paulmillr.com).
|
|
||||||
(function(globals) {
|
|
||||||
'use strict';
|
|
||||||
var each = function(items, next, callback) {
|
|
||||||
if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument');
|
|
||||||
if (typeof next !== 'function') throw new TypeError('each() expects function as second argument');
|
|
||||||
if (typeof callback !== 'function') callback = Function.prototype; // no-op
|
|
||||||
|
|
||||||
if (items.length === 0) return callback(undefined, items);
|
|
||||||
|
|
||||||
var transformed = new Array(items.length);
|
|
||||||
var count = 0;
|
|
||||||
var returned = false;
|
|
||||||
|
|
||||||
items.forEach(function(item, index) {
|
|
||||||
next(item, function(error, transformedItem) {
|
|
||||||
if (returned) return;
|
|
||||||
if (error) {
|
|
||||||
returned = true;
|
|
||||||
return callback(error);
|
|
||||||
}
|
|
||||||
transformed[index] = transformedItem;
|
|
||||||
count += 1;
|
|
||||||
if (count === items.length) return callback(undefined, transformed);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
if (typeof define !== 'undefined' && define.amd) {
|
|
||||||
define([], function() {
|
|
||||||
return each;
|
|
||||||
}); // RequireJS
|
|
||||||
} else if (typeof module !== 'undefined' && module.exports) {
|
|
||||||
module.exports = each; // CommonJS
|
|
||||||
} else {
|
|
||||||
globals.asyncEach = each; // <script>
|
|
||||||
}
|
|
||||||
})(this);
|
|
63
node_modules/async-each/package.json
generated
vendored
63
node_modules/async-each/package.json
generated
vendored
@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "async-each@^1.0.1",
|
|
||||||
"_id": "async-each@1.0.3",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
|
|
||||||
"_location": "/async-each",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "async-each@^1.0.1",
|
|
||||||
"name": "async-each",
|
|
||||||
"escapedName": "async-each",
|
|
||||||
"rawSpec": "^1.0.1",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.0.1"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/chokidar"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
|
|
||||||
"_shasum": "b727dbf87d7651602f06f4d4ac387f47d91b0cbf",
|
|
||||||
"_spec": "async-each@^1.0.1",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\chokidar",
|
|
||||||
"author": {
|
|
||||||
"name": "Paul Miller",
|
|
||||||
"url": "https://paulmillr.com/"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/paulmillr/async-each/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.",
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/paulmillr/async-each/",
|
|
||||||
"keywords": [
|
|
||||||
"async",
|
|
||||||
"forEach",
|
|
||||||
"each",
|
|
||||||
"map",
|
|
||||||
"asynchronous",
|
|
||||||
"iteration",
|
|
||||||
"iterate",
|
|
||||||
"loop",
|
|
||||||
"parallel",
|
|
||||||
"concurrent",
|
|
||||||
"array",
|
|
||||||
"flow",
|
|
||||||
"control flow"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "async-each",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/paulmillr/async-each.git"
|
|
||||||
},
|
|
||||||
"version": "1.0.3"
|
|
||||||
}
|
|
2
node_modules/async-limiter/.eslintignore
generated
vendored
2
node_modules/async-limiter/.eslintignore
generated
vendored
@ -1,2 +0,0 @@
|
|||||||
coverage
|
|
||||||
.nyc_output
|
|
10
node_modules/async-limiter/.nycrc
generated
vendored
10
node_modules/async-limiter/.nycrc
generated
vendored
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"check-coverage": false,
|
|
||||||
"lines": 99,
|
|
||||||
"statements": 99,
|
|
||||||
"functions": 99,
|
|
||||||
"branches": 99,
|
|
||||||
"include": [
|
|
||||||
"index.js"
|
|
||||||
]
|
|
||||||
}
|
|
9
node_modules/async-limiter/.travis.yml
generated
vendored
9
node_modules/async-limiter/.travis.yml
generated
vendored
@ -1,9 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "6"
|
|
||||||
- "8"
|
|
||||||
- "10"
|
|
||||||
- "node"
|
|
||||||
script: npm run travis
|
|
||||||
cache:
|
|
||||||
yarn: true
|
|
8
node_modules/async-limiter/LICENSE
generated
vendored
8
node_modules/async-limiter/LICENSE
generated
vendored
@ -1,8 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
Copyright (c) 2017 Samuel Reed <samuel.trace.reed@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.
|
|
67
node_modules/async-limiter/index.js
generated
vendored
67
node_modules/async-limiter/index.js
generated
vendored
@ -1,67 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
function Queue(options) {
|
|
||||||
if (!(this instanceof Queue)) {
|
|
||||||
return new Queue(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
this.concurrency = options.concurrency || Infinity;
|
|
||||||
this.pending = 0;
|
|
||||||
this.jobs = [];
|
|
||||||
this.cbs = [];
|
|
||||||
this._done = done.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var arrayAddMethods = [
|
|
||||||
'push',
|
|
||||||
'unshift',
|
|
||||||
'splice'
|
|
||||||
];
|
|
||||||
|
|
||||||
arrayAddMethods.forEach(function(method) {
|
|
||||||
Queue.prototype[method] = function() {
|
|
||||||
var methodResult = Array.prototype[method].apply(this.jobs, arguments);
|
|
||||||
this._run();
|
|
||||||
return methodResult;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
Object.defineProperty(Queue.prototype, 'length', {
|
|
||||||
get: function() {
|
|
||||||
return this.pending + this.jobs.length;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Queue.prototype._run = function() {
|
|
||||||
if (this.pending === this.concurrency) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.jobs.length) {
|
|
||||||
var job = this.jobs.shift();
|
|
||||||
this.pending++;
|
|
||||||
job(this._done);
|
|
||||||
this._run();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.pending === 0) {
|
|
||||||
while (this.cbs.length !== 0) {
|
|
||||||
var cb = this.cbs.pop();
|
|
||||||
process.nextTick(cb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Queue.prototype.onDone = function(cb) {
|
|
||||||
if (typeof cb === 'function') {
|
|
||||||
this.cbs.push(cb);
|
|
||||||
this._run();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function done() {
|
|
||||||
this.pending--;
|
|
||||||
this._run();
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = Queue;
|
|
69
node_modules/async-limiter/package.json
generated
vendored
69
node_modules/async-limiter/package.json
generated
vendored
@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "async-limiter@~1.0.0",
|
|
||||||
"_id": "async-limiter@1.0.1",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
|
|
||||||
"_location": "/async-limiter",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "async-limiter@~1.0.0",
|
|
||||||
"name": "async-limiter",
|
|
||||||
"escapedName": "async-limiter",
|
|
||||||
"rawSpec": "~1.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "~1.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/ws"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
|
|
||||||
"_shasum": "dd379e94f0db8310b08291f9d64c3209766617fd",
|
|
||||||
"_spec": "async-limiter@~1.0.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\ws",
|
|
||||||
"author": {
|
|
||||||
"name": "Samuel Reed"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/strml/async-limiter/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "asynchronous function queue with adjustable concurrency",
|
|
||||||
"devDependencies": {
|
|
||||||
"coveralls": "^3.0.3",
|
|
||||||
"eslint": "^5.16.0",
|
|
||||||
"eslint-plugin-mocha": "^5.3.0",
|
|
||||||
"intelli-espower-loader": "^1.0.1",
|
|
||||||
"mocha": "^6.1.4",
|
|
||||||
"nyc": "^14.1.1",
|
|
||||||
"power-assert": "^1.6.1"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/strml/async-limiter#readme",
|
|
||||||
"keywords": [
|
|
||||||
"throttle",
|
|
||||||
"async",
|
|
||||||
"limiter",
|
|
||||||
"asynchronous",
|
|
||||||
"job",
|
|
||||||
"task",
|
|
||||||
"concurrency",
|
|
||||||
"concurrent"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"name": "async-limiter",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/strml/async-limiter.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
|
|
||||||
"example": "node example",
|
|
||||||
"lint": "eslint .",
|
|
||||||
"test": "mocha --require intelli-espower-loader test/",
|
|
||||||
"travis": "npm run lint && npm run test"
|
|
||||||
},
|
|
||||||
"version": "1.0.1"
|
|
||||||
}
|
|
132
node_modules/async-limiter/readme.md
generated
vendored
132
node_modules/async-limiter/readme.md
generated
vendored
@ -1,132 +0,0 @@
|
|||||||
# Async-Limiter
|
|
||||||
|
|
||||||
A module for limiting concurrent asynchronous actions in flight. Forked from [queue](https://github.com/jessetane/queue).
|
|
||||||
|
|
||||||
[![npm](http://img.shields.io/npm/v/async-limiter.svg?style=flat-square)](http://www.npmjs.org/async-limiter)
|
|
||||||
[![tests](https://img.shields.io/travis/STRML/async-limiter.svg?style=flat-square&branch=master)](https://travis-ci.org/STRML/async-limiter)
|
|
||||||
[![coverage](https://img.shields.io/coveralls/STRML/async-limiter.svg?style=flat-square&branch=master)](https://coveralls.io/r/STRML/async-limiter)
|
|
||||||
|
|
||||||
This module exports a class `Limiter` that implements some of the `Array` API.
|
|
||||||
Pass async functions (ones that accept a callback or return a promise) to an instance's additive array methods.
|
|
||||||
|
|
||||||
## Motivation
|
|
||||||
|
|
||||||
Certain functions, like `zlib`, have [undesirable behavior](https://github.com/nodejs/node/issues/8871#issuecomment-250915913) when
|
|
||||||
run at infinite concurrency.
|
|
||||||
|
|
||||||
In this case, it is actually faster, and takes far less memory, to limit concurrency.
|
|
||||||
|
|
||||||
This module should do the absolute minimum work necessary to queue up functions. PRs are welcome that would
|
|
||||||
make this module faster or lighter, but new functionality is not desired.
|
|
||||||
|
|
||||||
Style should confirm to nodejs/node style.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
``` javascript
|
|
||||||
var Limiter = require('async-limiter')
|
|
||||||
|
|
||||||
var t = new Limiter({concurrency: 2});
|
|
||||||
var results = []
|
|
||||||
|
|
||||||
// add jobs using the familiar Array API
|
|
||||||
t.push(function (cb) {
|
|
||||||
results.push('two')
|
|
||||||
cb()
|
|
||||||
})
|
|
||||||
|
|
||||||
t.push(
|
|
||||||
function (cb) {
|
|
||||||
results.push('four')
|
|
||||||
cb()
|
|
||||||
},
|
|
||||||
function (cb) {
|
|
||||||
results.push('five')
|
|
||||||
cb()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
t.unshift(function (cb) {
|
|
||||||
results.push('one')
|
|
||||||
cb()
|
|
||||||
})
|
|
||||||
|
|
||||||
t.splice(2, 0, function (cb) {
|
|
||||||
results.push('three')
|
|
||||||
cb()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Jobs run automatically. If you want a callback when all are done,
|
|
||||||
// call 'onDone()'.
|
|
||||||
t.onDone(function () {
|
|
||||||
console.log('all done:', results)
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
## Zlib Example
|
|
||||||
|
|
||||||
```js
|
|
||||||
const zlib = require('zlib');
|
|
||||||
const Limiter = require('async-limiter');
|
|
||||||
|
|
||||||
const message = {some: "data"};
|
|
||||||
const payload = new Buffer(JSON.stringify(message));
|
|
||||||
|
|
||||||
// Try with different concurrency values to see how this actually
|
|
||||||
// slows significantly with higher concurrency!
|
|
||||||
//
|
|
||||||
// 5: 1398.607ms
|
|
||||||
// 10: 1375.668ms
|
|
||||||
// Infinity: 4423.300ms
|
|
||||||
//
|
|
||||||
const t = new Limiter({concurrency: 5});
|
|
||||||
function deflate(payload, cb) {
|
|
||||||
t.push(function(done) {
|
|
||||||
zlib.deflate(payload, function(err, buffer) {
|
|
||||||
done();
|
|
||||||
cb(err, buffer);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
console.time('deflate');
|
|
||||||
for(let i = 0; i < 30000; ++i) {
|
|
||||||
deflate(payload, function (err, buffer) {});
|
|
||||||
}
|
|
||||||
t.onDone(function() {
|
|
||||||
console.timeEnd('deflate');
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
`npm install async-limiter`
|
|
||||||
|
|
||||||
## Test
|
|
||||||
|
|
||||||
`npm test`
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
### `var t = new Limiter([opts])`
|
|
||||||
Constructor. `opts` may contain inital values for:
|
|
||||||
* `t.concurrency`
|
|
||||||
|
|
||||||
## Instance methods
|
|
||||||
|
|
||||||
### `t.onDone(fn)`
|
|
||||||
`fn` will be called once and only once, when the queue is empty.
|
|
||||||
|
|
||||||
## Instance methods mixed in from `Array`
|
|
||||||
Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
|
|
||||||
### `t.push(element1, ..., elementN)`
|
|
||||||
### `t.unshift(element1, ..., elementN)`
|
|
||||||
### `t.splice(index , howMany[, element1[, ...[, elementN]]])`
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
### `t.concurrency`
|
|
||||||
Max number of jobs the queue should process concurrently, defaults to `Infinity`.
|
|
||||||
|
|
||||||
### `t.length`
|
|
||||||
Jobs pending + jobs to process (readonly).
|
|
||||||
|
|
230
node_modules/atob/LICENSE
generated
vendored
230
node_modules/atob/LICENSE
generated
vendored
@ -1,230 +0,0 @@
|
|||||||
At your option you may choose either of the following licenses:
|
|
||||||
|
|
||||||
* The MIT License (MIT)
|
|
||||||
* The Apache License 2.0 (Apache-2.0)
|
|
||||||
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015 AJ ONeal
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright 2015 AJ ONeal
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
319
node_modules/atob/LICENSE.DOCS
generated
vendored
319
node_modules/atob/LICENSE.DOCS
generated
vendored
@ -1,319 +0,0 @@
|
|||||||
Creative Commons Legal Code
|
|
||||||
|
|
||||||
Attribution 3.0 Unported
|
|
||||||
|
|
||||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
||||||
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
|
|
||||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
||||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
||||||
REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
|
|
||||||
DAMAGES RESULTING FROM ITS USE.
|
|
||||||
|
|
||||||
License
|
|
||||||
|
|
||||||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
|
|
||||||
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
|
|
||||||
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
|
|
||||||
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
|
||||||
|
|
||||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
|
|
||||||
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
|
|
||||||
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
|
|
||||||
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
|
|
||||||
CONDITIONS.
|
|
||||||
|
|
||||||
1. Definitions
|
|
||||||
|
|
||||||
a. "Adaptation" means a work based upon the Work, or upon the Work and
|
|
||||||
other pre-existing works, such as a translation, adaptation,
|
|
||||||
derivative work, arrangement of music or other alterations of a
|
|
||||||
literary or artistic work, or phonogram or performance and includes
|
|
||||||
cinematographic adaptations or any other form in which the Work may be
|
|
||||||
recast, transformed, or adapted including in any form recognizably
|
|
||||||
derived from the original, except that a work that constitutes a
|
|
||||||
Collection will not be considered an Adaptation for the purpose of
|
|
||||||
this License. For the avoidance of doubt, where the Work is a musical
|
|
||||||
work, performance or phonogram, the synchronization of the Work in
|
|
||||||
timed-relation with a moving image ("synching") will be considered an
|
|
||||||
Adaptation for the purpose of this License.
|
|
||||||
b. "Collection" means a collection of literary or artistic works, such as
|
|
||||||
encyclopedias and anthologies, or performances, phonograms or
|
|
||||||
broadcasts, or other works or subject matter other than works listed
|
|
||||||
in Section 1(f) below, which, by reason of the selection and
|
|
||||||
arrangement of their contents, constitute intellectual creations, in
|
|
||||||
which the Work is included in its entirety in unmodified form along
|
|
||||||
with one or more other contributions, each constituting separate and
|
|
||||||
independent works in themselves, which together are assembled into a
|
|
||||||
collective whole. A work that constitutes a Collection will not be
|
|
||||||
considered an Adaptation (as defined above) for the purposes of this
|
|
||||||
License.
|
|
||||||
c. "Distribute" means to make available to the public the original and
|
|
||||||
copies of the Work or Adaptation, as appropriate, through sale or
|
|
||||||
other transfer of ownership.
|
|
||||||
d. "Licensor" means the individual, individuals, entity or entities that
|
|
||||||
offer(s) the Work under the terms of this License.
|
|
||||||
e. "Original Author" means, in the case of a literary or artistic work,
|
|
||||||
the individual, individuals, entity or entities who created the Work
|
|
||||||
or if no individual or entity can be identified, the publisher; and in
|
|
||||||
addition (i) in the case of a performance the actors, singers,
|
|
||||||
musicians, dancers, and other persons who act, sing, deliver, declaim,
|
|
||||||
play in, interpret or otherwise perform literary or artistic works or
|
|
||||||
expressions of folklore; (ii) in the case of a phonogram the producer
|
|
||||||
being the person or legal entity who first fixes the sounds of a
|
|
||||||
performance or other sounds; and, (iii) in the case of broadcasts, the
|
|
||||||
organization that transmits the broadcast.
|
|
||||||
f. "Work" means the literary and/or artistic work offered under the terms
|
|
||||||
of this License including without limitation any production in the
|
|
||||||
literary, scientific and artistic domain, whatever may be the mode or
|
|
||||||
form of its expression including digital form, such as a book,
|
|
||||||
pamphlet and other writing; a lecture, address, sermon or other work
|
|
||||||
of the same nature; a dramatic or dramatico-musical work; a
|
|
||||||
choreographic work or entertainment in dumb show; a musical
|
|
||||||
composition with or without words; a cinematographic work to which are
|
|
||||||
assimilated works expressed by a process analogous to cinematography;
|
|
||||||
a work of drawing, painting, architecture, sculpture, engraving or
|
|
||||||
lithography; a photographic work to which are assimilated works
|
|
||||||
expressed by a process analogous to photography; a work of applied
|
|
||||||
art; an illustration, map, plan, sketch or three-dimensional work
|
|
||||||
relative to geography, topography, architecture or science; a
|
|
||||||
performance; a broadcast; a phonogram; a compilation of data to the
|
|
||||||
extent it is protected as a copyrightable work; or a work performed by
|
|
||||||
a variety or circus performer to the extent it is not otherwise
|
|
||||||
considered a literary or artistic work.
|
|
||||||
g. "You" means an individual or entity exercising rights under this
|
|
||||||
License who has not previously violated the terms of this License with
|
|
||||||
respect to the Work, or who has received express permission from the
|
|
||||||
Licensor to exercise rights under this License despite a previous
|
|
||||||
violation.
|
|
||||||
h. "Publicly Perform" means to perform public recitations of the Work and
|
|
||||||
to communicate to the public those public recitations, by any means or
|
|
||||||
process, including by wire or wireless means or public digital
|
|
||||||
performances; to make available to the public Works in such a way that
|
|
||||||
members of the public may access these Works from a place and at a
|
|
||||||
place individually chosen by them; to perform the Work to the public
|
|
||||||
by any means or process and the communication to the public of the
|
|
||||||
performances of the Work, including by public digital performance; to
|
|
||||||
broadcast and rebroadcast the Work by any means including signs,
|
|
||||||
sounds or images.
|
|
||||||
i. "Reproduce" means to make copies of the Work by any means including
|
|
||||||
without limitation by sound or visual recordings and the right of
|
|
||||||
fixation and reproducing fixations of the Work, including storage of a
|
|
||||||
protected performance or phonogram in digital form or other electronic
|
|
||||||
medium.
|
|
||||||
|
|
||||||
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
|
|
||||||
limit, or restrict any uses free from copyright or rights arising from
|
|
||||||
limitations or exceptions that are provided for in connection with the
|
|
||||||
copyright protection under copyright law or other applicable laws.
|
|
||||||
|
|
||||||
3. License Grant. Subject to the terms and conditions of this License,
|
|
||||||
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
|
|
||||||
perpetual (for the duration of the applicable copyright) license to
|
|
||||||
exercise the rights in the Work as stated below:
|
|
||||||
|
|
||||||
a. to Reproduce the Work, to incorporate the Work into one or more
|
|
||||||
Collections, and to Reproduce the Work as incorporated in the
|
|
||||||
Collections;
|
|
||||||
b. to create and Reproduce Adaptations provided that any such Adaptation,
|
|
||||||
including any translation in any medium, takes reasonable steps to
|
|
||||||
clearly label, demarcate or otherwise identify that changes were made
|
|
||||||
to the original Work. For example, a translation could be marked "The
|
|
||||||
original work was translated from English to Spanish," or a
|
|
||||||
modification could indicate "The original work has been modified.";
|
|
||||||
c. to Distribute and Publicly Perform the Work including as incorporated
|
|
||||||
in Collections; and,
|
|
||||||
d. to Distribute and Publicly Perform Adaptations.
|
|
||||||
e. For the avoidance of doubt:
|
|
||||||
|
|
||||||
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
|
|
||||||
which the right to collect royalties through any statutory or
|
|
||||||
compulsory licensing scheme cannot be waived, the Licensor
|
|
||||||
reserves the exclusive right to collect such royalties for any
|
|
||||||
exercise by You of the rights granted under this License;
|
|
||||||
ii. Waivable Compulsory License Schemes. In those jurisdictions in
|
|
||||||
which the right to collect royalties through any statutory or
|
|
||||||
compulsory licensing scheme can be waived, the Licensor waives the
|
|
||||||
exclusive right to collect such royalties for any exercise by You
|
|
||||||
of the rights granted under this License; and,
|
|
||||||
iii. Voluntary License Schemes. The Licensor waives the right to
|
|
||||||
collect royalties, whether individually or, in the event that the
|
|
||||||
Licensor is a member of a collecting society that administers
|
|
||||||
voluntary licensing schemes, via that society, from any exercise
|
|
||||||
by You of the rights granted under this License.
|
|
||||||
|
|
||||||
The above rights may be exercised in all media and formats whether now
|
|
||||||
known or hereafter devised. The above rights include the right to make
|
|
||||||
such modifications as are technically necessary to exercise the rights in
|
|
||||||
other media and formats. Subject to Section 8(f), all rights not expressly
|
|
||||||
granted by Licensor are hereby reserved.
|
|
||||||
|
|
||||||
4. Restrictions. The license granted in Section 3 above is expressly made
|
|
||||||
subject to and limited by the following restrictions:
|
|
||||||
|
|
||||||
a. You may Distribute or Publicly Perform the Work only under the terms
|
|
||||||
of this License. You must include a copy of, or the Uniform Resource
|
|
||||||
Identifier (URI) for, this License with every copy of the Work You
|
|
||||||
Distribute or Publicly Perform. You may not offer or impose any terms
|
|
||||||
on the Work that restrict the terms of this License or the ability of
|
|
||||||
the recipient of the Work to exercise the rights granted to that
|
|
||||||
recipient under the terms of the License. You may not sublicense the
|
|
||||||
Work. You must keep intact all notices that refer to this License and
|
|
||||||
to the disclaimer of warranties with every copy of the Work You
|
|
||||||
Distribute or Publicly Perform. When You Distribute or Publicly
|
|
||||||
Perform the Work, You may not impose any effective technological
|
|
||||||
measures on the Work that restrict the ability of a recipient of the
|
|
||||||
Work from You to exercise the rights granted to that recipient under
|
|
||||||
the terms of the License. This Section 4(a) applies to the Work as
|
|
||||||
incorporated in a Collection, but this does not require the Collection
|
|
||||||
apart from the Work itself to be made subject to the terms of this
|
|
||||||
License. If You create a Collection, upon notice from any Licensor You
|
|
||||||
must, to the extent practicable, remove from the Collection any credit
|
|
||||||
as required by Section 4(b), as requested. If You create an
|
|
||||||
Adaptation, upon notice from any Licensor You must, to the extent
|
|
||||||
practicable, remove from the Adaptation any credit as required by
|
|
||||||
Section 4(b), as requested.
|
|
||||||
b. If You Distribute, or Publicly Perform the Work or any Adaptations or
|
|
||||||
Collections, You must, unless a request has been made pursuant to
|
|
||||||
Section 4(a), keep intact all copyright notices for the Work and
|
|
||||||
provide, reasonable to the medium or means You are utilizing: (i) the
|
|
||||||
name of the Original Author (or pseudonym, if applicable) if supplied,
|
|
||||||
and/or if the Original Author and/or Licensor designate another party
|
|
||||||
or parties (e.g., a sponsor institute, publishing entity, journal) for
|
|
||||||
attribution ("Attribution Parties") in Licensor's copyright notice,
|
|
||||||
terms of service or by other reasonable means, the name of such party
|
|
||||||
or parties; (ii) the title of the Work if supplied; (iii) to the
|
|
||||||
extent reasonably practicable, the URI, if any, that Licensor
|
|
||||||
specifies to be associated with the Work, unless such URI does not
|
|
||||||
refer to the copyright notice or licensing information for the Work;
|
|
||||||
and (iv) , consistent with Section 3(b), in the case of an Adaptation,
|
|
||||||
a credit identifying the use of the Work in the Adaptation (e.g.,
|
|
||||||
"French translation of the Work by Original Author," or "Screenplay
|
|
||||||
based on original Work by Original Author"). The credit required by
|
|
||||||
this Section 4 (b) may be implemented in any reasonable manner;
|
|
||||||
provided, however, that in the case of a Adaptation or Collection, at
|
|
||||||
a minimum such credit will appear, if a credit for all contributing
|
|
||||||
authors of the Adaptation or Collection appears, then as part of these
|
|
||||||
credits and in a manner at least as prominent as the credits for the
|
|
||||||
other contributing authors. For the avoidance of doubt, You may only
|
|
||||||
use the credit required by this Section for the purpose of attribution
|
|
||||||
in the manner set out above and, by exercising Your rights under this
|
|
||||||
License, You may not implicitly or explicitly assert or imply any
|
|
||||||
connection with, sponsorship or endorsement by the Original Author,
|
|
||||||
Licensor and/or Attribution Parties, as appropriate, of You or Your
|
|
||||||
use of the Work, without the separate, express prior written
|
|
||||||
permission of the Original Author, Licensor and/or Attribution
|
|
||||||
Parties.
|
|
||||||
c. Except as otherwise agreed in writing by the Licensor or as may be
|
|
||||||
otherwise permitted by applicable law, if You Reproduce, Distribute or
|
|
||||||
Publicly Perform the Work either by itself or as part of any
|
|
||||||
Adaptations or Collections, You must not distort, mutilate, modify or
|
|
||||||
take other derogatory action in relation to the Work which would be
|
|
||||||
prejudicial to the Original Author's honor or reputation. Licensor
|
|
||||||
agrees that in those jurisdictions (e.g. Japan), in which any exercise
|
|
||||||
of the right granted in Section 3(b) of this License (the right to
|
|
||||||
make Adaptations) would be deemed to be a distortion, mutilation,
|
|
||||||
modification or other derogatory action prejudicial to the Original
|
|
||||||
Author's honor and reputation, the Licensor will waive or not assert,
|
|
||||||
as appropriate, this Section, to the fullest extent permitted by the
|
|
||||||
applicable national law, to enable You to reasonably exercise Your
|
|
||||||
right under Section 3(b) of this License (right to make Adaptations)
|
|
||||||
but not otherwise.
|
|
||||||
|
|
||||||
5. Representations, Warranties and Disclaimer
|
|
||||||
|
|
||||||
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
|
|
||||||
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
|
|
||||||
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
|
|
||||||
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
|
|
||||||
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
|
|
||||||
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
|
|
||||||
OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
|
|
||||||
|
|
||||||
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
|
|
||||||
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
|
|
||||||
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
|
|
||||||
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
|
|
||||||
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
7. Termination
|
|
||||||
|
|
||||||
a. This License and the rights granted hereunder will terminate
|
|
||||||
automatically upon any breach by You of the terms of this License.
|
|
||||||
Individuals or entities who have received Adaptations or Collections
|
|
||||||
from You under this License, however, will not have their licenses
|
|
||||||
terminated provided such individuals or entities remain in full
|
|
||||||
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
|
|
||||||
survive any termination of this License.
|
|
||||||
b. Subject to the above terms and conditions, the license granted here is
|
|
||||||
perpetual (for the duration of the applicable copyright in the Work).
|
|
||||||
Notwithstanding the above, Licensor reserves the right to release the
|
|
||||||
Work under different license terms or to stop distributing the Work at
|
|
||||||
any time; provided, however that any such election will not serve to
|
|
||||||
withdraw this License (or any other license that has been, or is
|
|
||||||
required to be, granted under the terms of this License), and this
|
|
||||||
License will continue in full force and effect unless terminated as
|
|
||||||
stated above.
|
|
||||||
|
|
||||||
8. Miscellaneous
|
|
||||||
|
|
||||||
a. Each time You Distribute or Publicly Perform the Work or a Collection,
|
|
||||||
the Licensor offers to the recipient a license to the Work on the same
|
|
||||||
terms and conditions as the license granted to You under this License.
|
|
||||||
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
|
|
||||||
offers to the recipient a license to the original Work on the same
|
|
||||||
terms and conditions as the license granted to You under this License.
|
|
||||||
c. If any provision of this License is invalid or unenforceable under
|
|
||||||
applicable law, it shall not affect the validity or enforceability of
|
|
||||||
the remainder of the terms of this License, and without further action
|
|
||||||
by the parties to this agreement, such provision shall be reformed to
|
|
||||||
the minimum extent necessary to make such provision valid and
|
|
||||||
enforceable.
|
|
||||||
d. No term or provision of this License shall be deemed waived and no
|
|
||||||
breach consented to unless such waiver or consent shall be in writing
|
|
||||||
and signed by the party to be charged with such waiver or consent.
|
|
||||||
e. This License constitutes the entire agreement between the parties with
|
|
||||||
respect to the Work licensed here. There are no understandings,
|
|
||||||
agreements or representations with respect to the Work not specified
|
|
||||||
here. Licensor shall not be bound by any additional provisions that
|
|
||||||
may appear in any communication from You. This License may not be
|
|
||||||
modified without the mutual written agreement of the Licensor and You.
|
|
||||||
f. The rights granted under, and the subject matter referenced, in this
|
|
||||||
License were drafted utilizing the terminology of the Berne Convention
|
|
||||||
for the Protection of Literary and Artistic Works (as amended on
|
|
||||||
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
|
|
||||||
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
|
|
||||||
and the Universal Copyright Convention (as revised on July 24, 1971).
|
|
||||||
These rights and subject matter take effect in the relevant
|
|
||||||
jurisdiction in which the License terms are sought to be enforced
|
|
||||||
according to the corresponding provisions of the implementation of
|
|
||||||
those treaty provisions in the applicable national law. If the
|
|
||||||
standard suite of rights granted under applicable copyright law
|
|
||||||
includes additional rights not granted under this License, such
|
|
||||||
additional rights are deemed to be included in the License; this
|
|
||||||
License is not intended to restrict the license of any rights under
|
|
||||||
applicable law.
|
|
||||||
|
|
||||||
|
|
||||||
Creative Commons Notice
|
|
||||||
|
|
||||||
Creative Commons is not a party to this License, and makes no warranty
|
|
||||||
whatsoever in connection with the Work. Creative Commons will not be
|
|
||||||
liable to You or any party on any legal theory for any damages
|
|
||||||
whatsoever, including without limitation any general, special,
|
|
||||||
incidental or consequential damages arising in connection to this
|
|
||||||
license. Notwithstanding the foregoing two (2) sentences, if Creative
|
|
||||||
Commons has expressly identified itself as the Licensor hereunder, it
|
|
||||||
shall have all rights and obligations of Licensor.
|
|
||||||
|
|
||||||
Except for the limited purpose of indicating to the public that the
|
|
||||||
Work is licensed under the CCPL, Creative Commons does not authorize
|
|
||||||
the use by either party of the trademark "Creative Commons" or any
|
|
||||||
related trademark or logo of Creative Commons without the prior
|
|
||||||
written consent of Creative Commons. Any permitted use will be in
|
|
||||||
compliance with Creative Commons' then-current trademark usage
|
|
||||||
guidelines, as may be published on its website or otherwise made
|
|
||||||
available upon request from time to time. For the avoidance of doubt,
|
|
||||||
this trademark restriction does not form part of this License.
|
|
||||||
|
|
||||||
Creative Commons may be contacted at http://creativecommons.org/.
|
|
49
node_modules/atob/README.md
generated
vendored
49
node_modules/atob/README.md
generated
vendored
@ -1,49 +0,0 @@
|
|||||||
atob
|
|
||||||
===
|
|
||||||
|
|
||||||
| **atob**
|
|
||||||
| [btoa](https://git.coolaj86.com/coolaj86/btoa.js)
|
|
||||||
| [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
|
|
||||||
| Sponsored by [ppl](https://ppl.family)
|
|
||||||
|
|
||||||
Uses `Buffer` to emulate the exact functionality of the browser's atob.
|
|
||||||
|
|
||||||
Note: Unicode may be handled incorrectly (like the browser).
|
|
||||||
|
|
||||||
It turns base64-encoded <strong>a</strong>scii data back **to** <strong>b</strong>inary.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
(function () {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var atob = require('atob');
|
|
||||||
var b64 = "SGVsbG8sIFdvcmxkIQ==";
|
|
||||||
var bin = atob(b64);
|
|
||||||
|
|
||||||
console.log(bin); // "Hello, World!"
|
|
||||||
}());
|
|
||||||
```
|
|
||||||
|
|
||||||
### Need Unicode and Binary Support in the Browser?
|
|
||||||
|
|
||||||
Check out [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
|
|
||||||
|
|
||||||
Changelog
|
|
||||||
=======
|
|
||||||
|
|
||||||
* v2.1.0 address a few issues and PRs, update URLs
|
|
||||||
* v2.0.0 provide browser version for ios web workers
|
|
||||||
* v1.2.0 provide (empty) browser version
|
|
||||||
* v1.1.3 add MIT license
|
|
||||||
* v1.1.2 node only
|
|
||||||
|
|
||||||
LICENSE
|
|
||||||
=======
|
|
||||||
|
|
||||||
Code copyright 2012-2018 AJ ONeal
|
|
||||||
|
|
||||||
Dual-licensed MIT and Apache-2.0
|
|
||||||
|
|
||||||
Docs copyright 2012-2018 AJ ONeal
|
|
||||||
|
|
||||||
Docs released under [Creative Commons](https://git.coolaj86.com/coolaj86/atob.js/blob/master/LICENSE.DOCS).
|
|
6
node_modules/atob/bin/atob.js
generated
vendored
6
node_modules/atob/bin/atob.js
generated
vendored
@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var atob = require('../node-atob');
|
|
||||||
var str = process.argv[2];
|
|
||||||
console.log(atob(str));
|
|
24
node_modules/atob/bower.json
generated
vendored
24
node_modules/atob/bower.json
generated
vendored
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "atob",
|
|
||||||
"description": "atob for isomorphic environments",
|
|
||||||
"main": "browser-atob.js",
|
|
||||||
"authors": [
|
|
||||||
"AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com)"
|
|
||||||
],
|
|
||||||
"license": "(MIT OR Apache-2.0)",
|
|
||||||
"keywords": [
|
|
||||||
"atob",
|
|
||||||
"browser"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/node-browser-compat/atob",
|
|
||||||
"moduleType": [
|
|
||||||
"globals"
|
|
||||||
],
|
|
||||||
"ignore": [
|
|
||||||
"**/.*",
|
|
||||||
"node_modules",
|
|
||||||
"bower_components",
|
|
||||||
"test",
|
|
||||||
"tests"
|
|
||||||
]
|
|
||||||
}
|
|
44
node_modules/atob/browser-atob.js
generated
vendored
44
node_modules/atob/browser-atob.js
generated
vendored
@ -1,44 +0,0 @@
|
|||||||
(function (w) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
function findBest(atobNative) {
|
|
||||||
// normal window
|
|
||||||
if ('function' === typeof atobNative) { return atobNative; }
|
|
||||||
|
|
||||||
|
|
||||||
// browserify (web worker)
|
|
||||||
if ('function' === typeof Buffer) {
|
|
||||||
return function atobBrowserify(a) {
|
|
||||||
//!! Deliberately using an API that's deprecated in node.js because
|
|
||||||
//!! this file is for browsers and we expect them to cope with it.
|
|
||||||
//!! Discussion: github.com/node-browser-compat/atob/pull/9
|
|
||||||
return new Buffer(a, 'base64').toString('binary');
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// ios web worker with base64js
|
|
||||||
if ('object' === typeof w.base64js) {
|
|
||||||
// bufferToBinaryString
|
|
||||||
// https://git.coolaj86.com/coolaj86/unibabel.js/blob/master/index.js#L50
|
|
||||||
return function atobWebWorker_iOS(a) {
|
|
||||||
var buf = w.base64js.b64ToByteArray(a);
|
|
||||||
return Array.prototype.map.call(buf, function (ch) {
|
|
||||||
return String.fromCharCode(ch);
|
|
||||||
}).join('');
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return function () {
|
|
||||||
// ios web worker without base64js
|
|
||||||
throw new Error("You're probably in an old browser or an iOS webworker." +
|
|
||||||
" It might help to include beatgammit's base64-js.");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var atobBest = findBest(w.atob);
|
|
||||||
w.atob = atobBest;
|
|
||||||
|
|
||||||
if ((typeof module === 'object') && module && module.exports) {
|
|
||||||
module.exports = atobBest;
|
|
||||||
}
|
|
||||||
}(window));
|
|
7
node_modules/atob/node-atob.js
generated
vendored
7
node_modules/atob/node-atob.js
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
|
|
||||||
function atob(str) {
|
|
||||||
return Buffer.from(str, 'base64').toString('binary');
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = atob.atob = atob;
|
|
53
node_modules/atob/package.json
generated
vendored
53
node_modules/atob/package.json
generated
vendored
@ -1,53 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "atob@^2.1.1",
|
|
||||||
"_id": "atob@2.1.2",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
|
|
||||||
"_location": "/atob",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "atob@^2.1.1",
|
|
||||||
"name": "atob",
|
|
||||||
"escapedName": "atob",
|
|
||||||
"rawSpec": "^2.1.1",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^2.1.1"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/source-map-resolve"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
|
|
||||||
"_shasum": "6d9517eb9e030d2436666651e86bd9f6f13533c9",
|
|
||||||
"_spec": "atob@^2.1.1",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\source-map-resolve",
|
|
||||||
"author": {
|
|
||||||
"name": "AJ ONeal",
|
|
||||||
"email": "coolaj86@gmail.com",
|
|
||||||
"url": "https://coolaj86.com"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"atob": "bin/atob.js"
|
|
||||||
},
|
|
||||||
"browser": "browser-atob.js",
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "atob for Node.JS and Linux / Mac / Windows CLI (it's a one-liner)",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 4.5.0"
|
|
||||||
},
|
|
||||||
"homepage": "https://git.coolaj86.com/coolaj86/atob.js.git",
|
|
||||||
"keywords": [
|
|
||||||
"atob",
|
|
||||||
"browser"
|
|
||||||
],
|
|
||||||
"license": "(MIT OR Apache-2.0)",
|
|
||||||
"main": "node-atob.js",
|
|
||||||
"name": "atob",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://git.coolaj86.com/coolaj86/atob.js.git"
|
|
||||||
},
|
|
||||||
"version": "2.1.2"
|
|
||||||
}
|
|
18
node_modules/atob/test.js
generated
vendored
18
node_modules/atob/test.js
generated
vendored
@ -1,18 +0,0 @@
|
|||||||
(function () {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var atob = require('.');
|
|
||||||
var encoded = "SGVsbG8sIFdvcmxkIQ=="
|
|
||||||
var unencoded = "Hello, World!";
|
|
||||||
/*
|
|
||||||
, encoded = "SGVsbG8sIBZM"
|
|
||||||
, unencoded = "Hello, 世界"
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (unencoded !== atob(encoded)) {
|
|
||||||
console.log('[FAIL]', unencoded, atob(encoded));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('[PASS] all tests pass');
|
|
||||||
}());
|
|
5
node_modules/balanced-match/.npmignore
generated
vendored
5
node_modules/balanced-match/.npmignore
generated
vendored
@ -1,5 +0,0 @@
|
|||||||
test
|
|
||||||
.gitignore
|
|
||||||
.travis.yml
|
|
||||||
Makefile
|
|
||||||
example.js
|
|
21
node_modules/balanced-match/LICENSE.md
generated
vendored
21
node_modules/balanced-match/LICENSE.md
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
(MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
|
91
node_modules/balanced-match/README.md
generated
vendored
91
node_modules/balanced-match/README.md
generated
vendored
@ -1,91 +0,0 @@
|
|||||||
# balanced-match
|
|
||||||
|
|
||||||
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
|
|
||||||
|
|
||||||
[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
|
|
||||||
[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
|
|
||||||
|
|
||||||
[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
Get the first matching pair of braces:
|
|
||||||
|
|
||||||
```js
|
|
||||||
var balanced = require('balanced-match');
|
|
||||||
|
|
||||||
console.log(balanced('{', '}', 'pre{in{nested}}post'));
|
|
||||||
console.log(balanced('{', '}', 'pre{first}between{second}post'));
|
|
||||||
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
|
|
||||||
```
|
|
||||||
|
|
||||||
The matches are:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ node example.js
|
|
||||||
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
|
||||||
{ start: 3,
|
|
||||||
end: 9,
|
|
||||||
pre: 'pre',
|
|
||||||
body: 'first',
|
|
||||||
post: 'between{second}post' }
|
|
||||||
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
### var m = balanced(a, b, str)
|
|
||||||
|
|
||||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
|
||||||
object with those keys:
|
|
||||||
|
|
||||||
* **start** the index of the first match of `a`
|
|
||||||
* **end** the index of the matching `b`
|
|
||||||
* **pre** the preamble, `a` and `b` not included
|
|
||||||
* **body** the match, `a` and `b` not included
|
|
||||||
* **post** the postscript, `a` and `b` not included
|
|
||||||
|
|
||||||
If there's no match, `undefined` will be returned.
|
|
||||||
|
|
||||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
|
||||||
|
|
||||||
### var r = balanced.range(a, b, str)
|
|
||||||
|
|
||||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
|
||||||
array with indexes: `[ <a index>, <b index> ]`.
|
|
||||||
|
|
||||||
If there's no match, `undefined` will be returned.
|
|
||||||
|
|
||||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
With [npm](https://npmjs.org) do:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install balanced-match
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
(MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
|
59
node_modules/balanced-match/index.js
generated
vendored
59
node_modules/balanced-match/index.js
generated
vendored
@ -1,59 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
module.exports = balanced;
|
|
||||||
function balanced(a, b, str) {
|
|
||||||
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
||||||
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
||||||
|
|
||||||
var r = range(a, b, str);
|
|
||||||
|
|
||||||
return r && {
|
|
||||||
start: r[0],
|
|
||||||
end: r[1],
|
|
||||||
pre: str.slice(0, r[0]),
|
|
||||||
body: str.slice(r[0] + a.length, r[1]),
|
|
||||||
post: str.slice(r[1] + b.length)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function maybeMatch(reg, str) {
|
|
||||||
var m = str.match(reg);
|
|
||||||
return m ? m[0] : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
balanced.range = range;
|
|
||||||
function range(a, b, str) {
|
|
||||||
var begs, beg, left, right, result;
|
|
||||||
var ai = str.indexOf(a);
|
|
||||||
var bi = str.indexOf(b, ai + 1);
|
|
||||||
var i = ai;
|
|
||||||
|
|
||||||
if (ai >= 0 && bi > 0) {
|
|
||||||
begs = [];
|
|
||||||
left = str.length;
|
|
||||||
|
|
||||||
while (i >= 0 && !result) {
|
|
||||||
if (i == ai) {
|
|
||||||
begs.push(i);
|
|
||||||
ai = str.indexOf(a, i + 1);
|
|
||||||
} else if (begs.length == 1) {
|
|
||||||
result = [ begs.pop(), bi ];
|
|
||||||
} else {
|
|
||||||
beg = begs.pop();
|
|
||||||
if (beg < left) {
|
|
||||||
left = beg;
|
|
||||||
right = bi;
|
|
||||||
}
|
|
||||||
|
|
||||||
bi = str.indexOf(b, i + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
i = ai < bi && ai >= 0 ? ai : bi;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (begs.length) {
|
|
||||||
result = [ left, right ];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
77
node_modules/balanced-match/package.json
generated
vendored
77
node_modules/balanced-match/package.json
generated
vendored
@ -1,77 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "balanced-match@^1.0.0",
|
|
||||||
"_id": "balanced-match@1.0.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
|
||||||
"_location": "/balanced-match",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "balanced-match@^1.0.0",
|
|
||||||
"name": "balanced-match",
|
|
||||||
"escapedName": "balanced-match",
|
|
||||||
"rawSpec": "^1.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/brace-expansion"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
|
||||||
"_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
|
|
||||||
"_spec": "balanced-match@^1.0.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\brace-expansion",
|
|
||||||
"author": {
|
|
||||||
"name": "Julian Gruber",
|
|
||||||
"email": "mail@juliangruber.com",
|
|
||||||
"url": "http://juliangruber.com"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/juliangruber/balanced-match/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
|
||||||
"devDependencies": {
|
|
||||||
"matcha": "^0.7.0",
|
|
||||||
"tape": "^4.6.0"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/juliangruber/balanced-match",
|
|
||||||
"keywords": [
|
|
||||||
"match",
|
|
||||||
"regexp",
|
|
||||||
"test",
|
|
||||||
"balanced",
|
|
||||||
"parse"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "balanced-match",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/juliangruber/balanced-match.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"bench": "make bench",
|
|
||||||
"test": "make test"
|
|
||||||
},
|
|
||||||
"testling": {
|
|
||||||
"files": "test/*.js",
|
|
||||||
"browsers": [
|
|
||||||
"ie/8..latest",
|
|
||||||
"firefox/20..latest",
|
|
||||||
"firefox/nightly",
|
|
||||||
"chrome/25..latest",
|
|
||||||
"chrome/canary",
|
|
||||||
"opera/12..latest",
|
|
||||||
"opera/next",
|
|
||||||
"safari/5.1..latest",
|
|
||||||
"ipad/6.0..latest",
|
|
||||||
"iphone/6.0..latest",
|
|
||||||
"android-browser/4.2..latest"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"version": "1.0.0"
|
|
||||||
}
|
|
21
node_modules/base/LICENSE
generated
vendored
21
node_modules/base/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
|
||||||
|
|
||||||
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.
|
|
491
node_modules/base/README.md
generated
vendored
491
node_modules/base/README.md
generated
vendored
@ -1,491 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<a href="https://github.com/node-base/base">
|
|
||||||
<img height="250" width="250" src="https://raw.githubusercontent.com/node-base/base/master/docs/logo.png">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# base [![NPM version](https://img.shields.io/npm/v/base.svg?style=flat)](https://www.npmjs.com/package/base) [![NPM monthly downloads](https://img.shields.io/npm/dm/base.svg?style=flat)](https://npmjs.org/package/base) [![NPM total downloads](https://img.shields.io/npm/dt/base.svg?style=flat)](https://npmjs.org/package/base) [![Linux Build Status](https://img.shields.io/travis/node-base/base.svg?style=flat&label=Travis)](https://travis-ci.org/node-base/base)
|
|
||||||
|
|
||||||
> base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save base
|
|
||||||
```
|
|
||||||
|
|
||||||
## What is Base?
|
|
||||||
|
|
||||||
Base is a framework for rapidly creating high quality node.js applications, using plugins like building blocks.
|
|
||||||
|
|
||||||
### Guiding principles
|
|
||||||
|
|
||||||
The core team follows these principles to help guide API decisions:
|
|
||||||
|
|
||||||
* **Compact API surface**: The smaller the API surface, the easier the library will be to learn and use.
|
|
||||||
* **Easy to extend**: Implementors can use any npm package, and write plugins in pure JavaScript. If you're building complex apps, Base simplifies inheritance.
|
|
||||||
* **Easy to test**: No special setup should be required to unit test `Base` or base plugins
|
|
||||||
|
|
||||||
### Minimal API surface
|
|
||||||
|
|
||||||
[The API](#api) was designed to provide only the minimum necessary functionality for creating a useful application, with or without [plugins](#plugins).
|
|
||||||
|
|
||||||
**Base core**
|
|
||||||
|
|
||||||
Base itself ships with only a handful of [useful methods](#api), such as:
|
|
||||||
|
|
||||||
* `.set`: for setting values on the instance
|
|
||||||
* `.get`: for getting values from the instance
|
|
||||||
* `.has`: to check if a property exists on the instance
|
|
||||||
* `.define`: for setting non-enumerable values on the instance
|
|
||||||
* `.use`: for adding plugins
|
|
||||||
|
|
||||||
**Be generic**
|
|
||||||
|
|
||||||
When deciding on method to add or remove, we try to answer these questions:
|
|
||||||
|
|
||||||
1. Will all or most Base applications need this method?
|
|
||||||
2. Will this method encourage practices or enforce conventions that are beneficial to implementors?
|
|
||||||
3. Can or should this be done in a plugin instead?
|
|
||||||
|
|
||||||
### Composability
|
|
||||||
|
|
||||||
**Plugin system**
|
|
||||||
|
|
||||||
It couldn't be easier to extend Base with any features or custom functionality you can think of.
|
|
||||||
|
|
||||||
Base plugins are just functions that take an instance of `Base`:
|
|
||||||
|
|
||||||
```js
|
|
||||||
var base = new Base();
|
|
||||||
|
|
||||||
function plugin(base) {
|
|
||||||
// do plugin stuff, in pure JavaScript
|
|
||||||
}
|
|
||||||
// use the plugin
|
|
||||||
base.use(plugin);
|
|
||||||
```
|
|
||||||
|
|
||||||
**Inheritance**
|
|
||||||
|
|
||||||
Easily inherit Base using `.extend`:
|
|
||||||
|
|
||||||
```js
|
|
||||||
var Base = require('base');
|
|
||||||
|
|
||||||
function MyApp() {
|
|
||||||
Base.call(this);
|
|
||||||
}
|
|
||||||
Base.extend(MyApp);
|
|
||||||
|
|
||||||
var app = new MyApp();
|
|
||||||
app.set('a', 'b');
|
|
||||||
app.get('a');
|
|
||||||
//=> 'b';
|
|
||||||
```
|
|
||||||
|
|
||||||
**Inherit or instantiate with a namespace**
|
|
||||||
|
|
||||||
By default, the `.get`, `.set` and `.has` methods set and get values from the root of the `base` instance. You can customize this using the `.namespace` method exposed on the exported function. For example:
|
|
||||||
|
|
||||||
```js
|
|
||||||
var Base = require('base');
|
|
||||||
// get and set values on the `base.cache` object
|
|
||||||
var base = Base.namespace('cache');
|
|
||||||
|
|
||||||
var app = base();
|
|
||||||
app.set('foo', 'bar');
|
|
||||||
console.log(app.cache.foo);
|
|
||||||
//=> 'bar'
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
**Usage**
|
|
||||||
|
|
||||||
```js
|
|
||||||
var Base = require('base');
|
|
||||||
var app = new Base();
|
|
||||||
app.set('foo', 'bar');
|
|
||||||
console.log(app.foo);
|
|
||||||
//=> 'bar'
|
|
||||||
```
|
|
||||||
|
|
||||||
### [Base](index.js#L44)
|
|
||||||
|
|
||||||
Create an instance of `Base` with the given `config` and `options`.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `config` **{Object}**: If supplied, this object is passed to [cache-base](https://github.com/jonschlinkert/cache-base) to merge onto the the instance upon instantiation.
|
|
||||||
* `options` **{Object}**: If supplied, this object is used to initialize the `base.options` object.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
// initialize with `config` and `options`
|
|
||||||
var app = new Base({isApp: true}, {abc: true});
|
|
||||||
app.set('foo', 'bar');
|
|
||||||
|
|
||||||
// values defined with the given `config` object will be on the root of the instance
|
|
||||||
console.log(app.baz); //=> undefined
|
|
||||||
console.log(app.foo); //=> 'bar'
|
|
||||||
// or use `.get`
|
|
||||||
console.log(app.get('isApp')); //=> true
|
|
||||||
console.log(app.get('foo')); //=> 'bar'
|
|
||||||
|
|
||||||
// values defined with the given `options` object will be on `app.options
|
|
||||||
console.log(app.options.abc); //=> true
|
|
||||||
```
|
|
||||||
|
|
||||||
### [.is](index.js#L107)
|
|
||||||
|
|
||||||
Set the given `name` on `app._name` and `app.is*` properties. Used for doing lookups in plugins.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `name` **{String}**
|
|
||||||
* `returns` **{Boolean}**
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
app.is('foo');
|
|
||||||
console.log(app._name);
|
|
||||||
//=> 'foo'
|
|
||||||
console.log(app.isFoo);
|
|
||||||
//=> true
|
|
||||||
app.is('bar');
|
|
||||||
console.log(app.isFoo);
|
|
||||||
//=> true
|
|
||||||
console.log(app.isBar);
|
|
||||||
//=> true
|
|
||||||
console.log(app._name);
|
|
||||||
//=> 'bar'
|
|
||||||
```
|
|
||||||
|
|
||||||
### [.isRegistered](index.js#L145)
|
|
||||||
|
|
||||||
Returns true if a plugin has already been registered on an instance.
|
|
||||||
|
|
||||||
Plugin implementors are encouraged to use this first thing in a plugin
|
|
||||||
to prevent the plugin from being called more than once on the same
|
|
||||||
instance.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `name` **{String}**: The plugin name.
|
|
||||||
* `register` **{Boolean}**: If the plugin if not already registered, to record it as being registered pass `true` as the second argument.
|
|
||||||
* `returns` **{Boolean}**: Returns true if a plugin is already registered.
|
|
||||||
|
|
||||||
**Events**
|
|
||||||
|
|
||||||
* `emits`: `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
var base = new Base();
|
|
||||||
base.use(function(app) {
|
|
||||||
if (app.isRegistered('myPlugin')) return;
|
|
||||||
// do stuff to `app`
|
|
||||||
});
|
|
||||||
|
|
||||||
// to also record the plugin as being registered
|
|
||||||
base.use(function(app) {
|
|
||||||
if (app.isRegistered('myPlugin', true)) return;
|
|
||||||
// do stuff to `app`
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### [.use](index.js#L175)
|
|
||||||
|
|
||||||
Define a plugin function to be called immediately upon init. Plugins are chainable and expose the following arguments to the plugin function:
|
|
||||||
|
|
||||||
* `app`: the current instance of `Base`
|
|
||||||
* `base`: the [first ancestor instance](#base) of `Base`
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `fn` **{Function}**: plugin function to call
|
|
||||||
* `returns` **{Object}**: Returns the item instance for chaining.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
var app = new Base()
|
|
||||||
.use(foo)
|
|
||||||
.use(bar)
|
|
||||||
.use(baz)
|
|
||||||
```
|
|
||||||
|
|
||||||
### [.define](index.js#L197)
|
|
||||||
|
|
||||||
The `.define` method is used for adding non-enumerable property on the instance. Dot-notation is **not supported** with `define`.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `key` **{String}**: The name of the property to define.
|
|
||||||
* `value` **{any}**
|
|
||||||
* `returns` **{Object}**: Returns the instance for chaining.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
// arbitrary `render` function using lodash `template`
|
|
||||||
app.define('render', function(str, locals) {
|
|
||||||
return _.template(str)(locals);
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### [.mixin](index.js#L222)
|
|
||||||
|
|
||||||
Mix property `key` onto the Base prototype. If base is inherited using `Base.extend` this method will be overridden by a new `mixin` method that will only add properties to the prototype of the inheriting application.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `key` **{String}**
|
|
||||||
* `val` **{Object|Array}**
|
|
||||||
* `returns` **{Object}**: Returns the `base` instance for chaining.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
app.mixin('foo', function() {
|
|
||||||
// do stuff
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### [.base](index.js#L268)
|
|
||||||
|
|
||||||
Getter/setter used when creating nested instances of `Base`, for storing a reference to the first ancestor instance. This works by setting an instance of `Base` on the `parent` property of a "child" instance. The `base` property defaults to the current instance if no `parent` property is defined.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
// create an instance of `Base`, this is our first ("base") instance
|
|
||||||
var first = new Base();
|
|
||||||
first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later
|
|
||||||
|
|
||||||
// create another instance
|
|
||||||
var second = new Base();
|
|
||||||
// create a reference to the first instance (`first`)
|
|
||||||
second.parent = first;
|
|
||||||
|
|
||||||
// create another instance
|
|
||||||
var third = new Base();
|
|
||||||
// create a reference to the previous instance (`second`)
|
|
||||||
// repeat this pattern every time a "child" instance is created
|
|
||||||
third.parent = second;
|
|
||||||
|
|
||||||
// we can always access the first instance using the `base` property
|
|
||||||
console.log(first.base.foo);
|
|
||||||
//=> 'bar'
|
|
||||||
console.log(second.base.foo);
|
|
||||||
//=> 'bar'
|
|
||||||
console.log(third.base.foo);
|
|
||||||
//=> 'bar'
|
|
||||||
// and now you know how to get to third base ;)
|
|
||||||
```
|
|
||||||
|
|
||||||
### [#use](index.js#L293)
|
|
||||||
|
|
||||||
Static method for adding global plugin functions that will be added to an instance when created.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `fn` **{Function}**: Plugin function to use on each instance.
|
|
||||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
Base.use(function(app) {
|
|
||||||
app.foo = 'bar';
|
|
||||||
});
|
|
||||||
var app = new Base();
|
|
||||||
console.log(app.foo);
|
|
||||||
//=> 'bar'
|
|
||||||
```
|
|
||||||
|
|
||||||
### [#extend](index.js#L337)
|
|
||||||
|
|
||||||
Static method for inheriting the prototype and static methods of the `Base` class. This method greatly simplifies the process of creating inheritance-based applications. See [static-extend](https://github.com/jonschlinkert/static-extend) for more details.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `Ctor` **{Function}**: constructor to extend
|
|
||||||
* `methods` **{Object}**: Optional prototype properties to mix in.
|
|
||||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
var extend = cu.extend(Parent);
|
|
||||||
Parent.extend(Child);
|
|
||||||
|
|
||||||
// optional methods
|
|
||||||
Parent.extend(Child, {
|
|
||||||
foo: function() {},
|
|
||||||
bar: function() {}
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### [#mixin](index.js#L379)
|
|
||||||
|
|
||||||
Used for adding methods to the `Base` prototype, and/or to the prototype of child instances. When a mixin function returns a function, the returned function is pushed onto the `.mixins` array, making it available to be used on inheriting classes whenever `Base.mixins()` is called (e.g. `Base.mixins(Child)`).
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `fn` **{Function}**: Function to call
|
|
||||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
Base.mixin(function(proto) {
|
|
||||||
proto.foo = function(msg) {
|
|
||||||
return 'foo ' + msg;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### [#mixins](index.js#L401)
|
|
||||||
|
|
||||||
Static method for running global mixin functions against a child constructor. Mixins must be registered before calling this method.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `Child` **{Function}**: Constructor function of a child class
|
|
||||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
Base.extend(Child);
|
|
||||||
Base.mixins(Child);
|
|
||||||
```
|
|
||||||
|
|
||||||
### [#inherit](index.js#L420)
|
|
||||||
|
|
||||||
Similar to `util.inherit`, but copies all static properties, prototype properties, and getters/setters from `Provider` to `Receiver`. See [class-utils](https://github.com/jonschlinkert/class-utils#inherit) for more details.
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `Receiver` **{Function}**: Receiving (child) constructor
|
|
||||||
* `Provider` **{Function}**: Providing (parent) constructor
|
|
||||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
Base.inherit(Foo, Bar);
|
|
||||||
```
|
|
||||||
|
|
||||||
## In the wild
|
|
||||||
|
|
||||||
The following node.js applications were built with `Base`:
|
|
||||||
|
|
||||||
* [assemble](https://github.com/assemble/assemble)
|
|
||||||
* [verb](https://github.com/verbose/verb)
|
|
||||||
* [generate](https://github.com/generate/generate)
|
|
||||||
* [scaffold](https://github.com/jonschlinkert/scaffold)
|
|
||||||
* [boilerplate](https://github.com/jonschlinkert/boilerplate)
|
|
||||||
|
|
||||||
## Test coverage
|
|
||||||
|
|
||||||
```
|
|
||||||
Statements : 98.91% ( 91/92 )
|
|
||||||
Branches : 92.86% ( 26/28 )
|
|
||||||
Functions : 100% ( 17/17 )
|
|
||||||
Lines : 98.9% ( 90/91 )
|
|
||||||
```
|
|
||||||
|
|
||||||
## History
|
|
||||||
|
|
||||||
### v0.11.2
|
|
||||||
|
|
||||||
* fixes https://github.com/micromatch/micromatch/issues/99
|
|
||||||
|
|
||||||
### v0.11.0
|
|
||||||
|
|
||||||
**Breaking changes**
|
|
||||||
|
|
||||||
* Static `.use` and `.run` methods are now non-enumerable
|
|
||||||
|
|
||||||
### v0.9.0
|
|
||||||
|
|
||||||
**Breaking changes**
|
|
||||||
|
|
||||||
* `.is` no longer takes a function, a string must be passed
|
|
||||||
* all remaining `.debug` code has been removed
|
|
||||||
* `app._namespace` was removed (related to `debug`)
|
|
||||||
* `.plugin`, `.use`, and `.define` no longer emit events
|
|
||||||
* `.assertPlugin` was removed
|
|
||||||
* `.lazy` was removed
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
* [base-cwd](https://www.npmjs.com/package/base-cwd): Base plugin that adds a getter/setter for the current working directory. | [homepage](https://github.com/node-base/base-cwd "Base plugin that adds a getter/setter for the current working directory.")
|
|
||||||
* [base-data](https://www.npmjs.com/package/base-data): adds a `data` method to base-methods. | [homepage](https://github.com/node-base/base-data "adds a `data` method to base-methods.")
|
|
||||||
* [base-fs](https://www.npmjs.com/package/base-fs): base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file… [more](https://github.com/node-base/base-fs) | [homepage](https://github.com/node-base/base-fs "base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file system, like src, dest, copy and symlink.")
|
|
||||||
* [base-generators](https://www.npmjs.com/package/base-generators): Adds project-generator support to your `base` application. | [homepage](https://github.com/node-base/base-generators "Adds project-generator support to your `base` application.")
|
|
||||||
* [base-option](https://www.npmjs.com/package/base-option): Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme… [more](https://github.com/node-base/base-option) | [homepage](https://github.com/node-base/base-option "Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme for the full API.")
|
|
||||||
* [base-pipeline](https://www.npmjs.com/package/base-pipeline): base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines. | [homepage](https://github.com/node-base/base-pipeline "base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines.")
|
|
||||||
* [base-pkg](https://www.npmjs.com/package/base-pkg): Plugin for adding a `pkg` method that exposes pkg-store to your base application. | [homepage](https://github.com/node-base/base-pkg "Plugin for adding a `pkg` method that exposes pkg-store to your base application.")
|
|
||||||
* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins "Adds 'smart plugin' support to your base application.")
|
|
||||||
* [base-questions](https://www.npmjs.com/package/base-questions): Plugin for base-methods that adds methods for prompting the user and storing the answers on… [more](https://github.com/node-base/base-questions) | [homepage](https://github.com/node-base/base-questions "Plugin for base-methods that adds methods for prompting the user and storing the answers on a project-by-project basis.")
|
|
||||||
* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://github.com/node-base/base-store) | [homepage](https://github.com/node-base/base-store "Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object that exposes all of the methods from the data-store library. Also now supports sub-stores!")
|
|
||||||
* [base-task](https://www.npmjs.com/package/base-task): base plugin that provides a very thin wrapper around [https://github.com/doowb/composer](https://github.com/doowb/composer) for adding task methods to… [more](https://github.com/node-base/base-task) | [homepage](https://github.com/node-base/base-task "base plugin that provides a very thin wrapper around <https://github.com/doowb/composer> for adding task methods to your application.")
|
|
||||||
|
|
||||||
### Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
|
|
||||||
| **Commits** | **Contributor** |
|
|
||||||
| --- | --- |
|
|
||||||
| 141 | [jonschlinkert](https://github.com/jonschlinkert) |
|
|
||||||
| 30 | [doowb](https://github.com/doowb) |
|
|
||||||
| 3 | [charlike](https://github.com/charlike) |
|
|
||||||
| 1 | [criticalmash](https://github.com/criticalmash) |
|
|
||||||
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
|
|
||||||
|
|
||||||
### Building docs
|
|
||||||
|
|
||||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
||||||
|
|
||||||
To generate the readme, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running tests
|
|
||||||
|
|
||||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT License](LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 07, 2017._
|
|
435
node_modules/base/index.js
generated
vendored
435
node_modules/base/index.js
generated
vendored
@ -1,435 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
var util = require('util');
|
|
||||||
var define = require('define-property');
|
|
||||||
var CacheBase = require('cache-base');
|
|
||||||
var Emitter = require('component-emitter');
|
|
||||||
var isObject = require('isobject');
|
|
||||||
var merge = require('mixin-deep');
|
|
||||||
var pascal = require('pascalcase');
|
|
||||||
var cu = require('class-utils');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optionally define a custom `cache` namespace to use.
|
|
||||||
*/
|
|
||||||
|
|
||||||
function namespace(name) {
|
|
||||||
var Cache = name ? CacheBase.namespace(name) : CacheBase;
|
|
||||||
var fns = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create an instance of `Base` with the given `config` and `options`.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* // initialize with `config` and `options`
|
|
||||||
* var app = new Base({isApp: true}, {abc: true});
|
|
||||||
* app.set('foo', 'bar');
|
|
||||||
*
|
|
||||||
* // values defined with the given `config` object will be on the root of the instance
|
|
||||||
* console.log(app.baz); //=> undefined
|
|
||||||
* console.log(app.foo); //=> 'bar'
|
|
||||||
* // or use `.get`
|
|
||||||
* console.log(app.get('isApp')); //=> true
|
|
||||||
* console.log(app.get('foo')); //=> 'bar'
|
|
||||||
*
|
|
||||||
* // values defined with the given `options` object will be on `app.options
|
|
||||||
* console.log(app.options.abc); //=> true
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation.
|
|
||||||
* @param {Object} `options` If supplied, this object is used to initialize the `base.options` object.
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
function Base(config, options) {
|
|
||||||
if (!(this instanceof Base)) {
|
|
||||||
return new Base(config, options);
|
|
||||||
}
|
|
||||||
Cache.call(this, config);
|
|
||||||
this.is('base');
|
|
||||||
this.initBase(config, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Inherit cache-base
|
|
||||||
*/
|
|
||||||
|
|
||||||
util.inherits(Base, Cache);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add static emitter methods
|
|
||||||
*/
|
|
||||||
|
|
||||||
Emitter(Base);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize `Base` defaults with the given `config` object
|
|
||||||
*/
|
|
||||||
|
|
||||||
Base.prototype.initBase = function(config, options) {
|
|
||||||
this.options = merge({}, this.options, options);
|
|
||||||
this.cache = this.cache || {};
|
|
||||||
this.define('registered', {});
|
|
||||||
if (name) this[name] = {};
|
|
||||||
|
|
||||||
// make `app._callbacks` non-enumerable
|
|
||||||
this.define('_callbacks', this._callbacks);
|
|
||||||
if (isObject(config)) {
|
|
||||||
this.visit('set', config);
|
|
||||||
}
|
|
||||||
Base.run(this, 'use', fns);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the given `name` on `app._name` and `app.is*` properties. Used for doing
|
|
||||||
* lookups in plugins.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* app.is('foo');
|
|
||||||
* console.log(app._name);
|
|
||||||
* //=> 'foo'
|
|
||||||
* console.log(app.isFoo);
|
|
||||||
* //=> true
|
|
||||||
* app.is('bar');
|
|
||||||
* console.log(app.isFoo);
|
|
||||||
* //=> true
|
|
||||||
* console.log(app.isBar);
|
|
||||||
* //=> true
|
|
||||||
* console.log(app._name);
|
|
||||||
* //=> 'bar'
|
|
||||||
* ```
|
|
||||||
* @name .is
|
|
||||||
* @param {String} `name`
|
|
||||||
* @return {Boolean}
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Base.prototype.is = function(name) {
|
|
||||||
if (typeof name !== 'string') {
|
|
||||||
throw new TypeError('expected name to be a string');
|
|
||||||
}
|
|
||||||
this.define('is' + pascal(name), true);
|
|
||||||
this.define('_name', name);
|
|
||||||
this.define('_appname', name);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if a plugin has already been registered on an instance.
|
|
||||||
*
|
|
||||||
* Plugin implementors are encouraged to use this first thing in a plugin
|
|
||||||
* to prevent the plugin from being called more than once on the same
|
|
||||||
* instance.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* var base = new Base();
|
|
||||||
* base.use(function(app) {
|
|
||||||
* if (app.isRegistered('myPlugin')) return;
|
|
||||||
* // do stuff to `app`
|
|
||||||
* });
|
|
||||||
*
|
|
||||||
* // to also record the plugin as being registered
|
|
||||||
* base.use(function(app) {
|
|
||||||
* if (app.isRegistered('myPlugin', true)) return;
|
|
||||||
* // do stuff to `app`
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* @name .isRegistered
|
|
||||||
* @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.
|
|
||||||
* @param {String} `name` The plugin name.
|
|
||||||
* @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument.
|
|
||||||
* @return {Boolean} Returns true if a plugin is already registered.
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Base.prototype.isRegistered = function(name, register) {
|
|
||||||
if (this.registered.hasOwnProperty(name)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (register !== false) {
|
|
||||||
this.registered[name] = true;
|
|
||||||
this.emit('plugin', name);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define a plugin function to be called immediately upon init. Plugins are chainable
|
|
||||||
* and expose the following arguments to the plugin function:
|
|
||||||
*
|
|
||||||
* - `app`: the current instance of `Base`
|
|
||||||
* - `base`: the [first ancestor instance](#base) of `Base`
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* var app = new Base()
|
|
||||||
* .use(foo)
|
|
||||||
* .use(bar)
|
|
||||||
* .use(baz)
|
|
||||||
* ```
|
|
||||||
* @name .use
|
|
||||||
* @param {Function} `fn` plugin function to call
|
|
||||||
* @return {Object} Returns the item instance for chaining.
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Base.prototype.use = function(fn) {
|
|
||||||
fn.call(this, this);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `.define` method is used for adding non-enumerable property on the instance.
|
|
||||||
* Dot-notation is **not supported** with `define`.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* // arbitrary `render` function using lodash `template`
|
|
||||||
* app.define('render', function(str, locals) {
|
|
||||||
* return _.template(str)(locals);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* @name .define
|
|
||||||
* @param {String} `key` The name of the property to define.
|
|
||||||
* @param {any} `value`
|
|
||||||
* @return {Object} Returns the instance for chaining.
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Base.prototype.define = function(key, val) {
|
|
||||||
if (isObject(key)) {
|
|
||||||
return this.visit('define', key);
|
|
||||||
}
|
|
||||||
define(this, key, val);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mix property `key` onto the Base prototype. If base is inherited using
|
|
||||||
* `Base.extend` this method will be overridden by a new `mixin` method that will
|
|
||||||
* only add properties to the prototype of the inheriting application.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* app.mixin('foo', function() {
|
|
||||||
* // do stuff
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* @name .mixin
|
|
||||||
* @param {String} `key`
|
|
||||||
* @param {Object|Array} `val`
|
|
||||||
* @return {Object} Returns the `base` instance for chaining.
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Base.prototype.mixin = function(key, val) {
|
|
||||||
Base.prototype[key] = val;
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Non-enumberable mixin array, used by the static [Base.mixin]() method.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Base.prototype.mixins = Base.prototype.mixins || [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Getter/setter used when creating nested instances of `Base`, for storing a reference
|
|
||||||
* to the first ancestor instance. This works by setting an instance of `Base` on the `parent`
|
|
||||||
* property of a "child" instance. The `base` property defaults to the current instance if
|
|
||||||
* no `parent` property is defined.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* // create an instance of `Base`, this is our first ("base") instance
|
|
||||||
* var first = new Base();
|
|
||||||
* first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later
|
|
||||||
*
|
|
||||||
* // create another instance
|
|
||||||
* var second = new Base();
|
|
||||||
* // create a reference to the first instance (`first`)
|
|
||||||
* second.parent = first;
|
|
||||||
*
|
|
||||||
* // create another instance
|
|
||||||
* var third = new Base();
|
|
||||||
* // create a reference to the previous instance (`second`)
|
|
||||||
* // repeat this pattern every time a "child" instance is created
|
|
||||||
* third.parent = second;
|
|
||||||
*
|
|
||||||
* // we can always access the first instance using the `base` property
|
|
||||||
* console.log(first.base.foo);
|
|
||||||
* //=> 'bar'
|
|
||||||
* console.log(second.base.foo);
|
|
||||||
* //=> 'bar'
|
|
||||||
* console.log(third.base.foo);
|
|
||||||
* //=> 'bar'
|
|
||||||
* // and now you know how to get to third base ;)
|
|
||||||
* ```
|
|
||||||
* @name .base
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
Object.defineProperty(Base.prototype, 'base', {
|
|
||||||
configurable: true,
|
|
||||||
get: function() {
|
|
||||||
return this.parent ? this.parent.base : this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static method for adding global plugin functions that will
|
|
||||||
* be added to an instance when created.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* Base.use(function(app) {
|
|
||||||
* app.foo = 'bar';
|
|
||||||
* });
|
|
||||||
* var app = new Base();
|
|
||||||
* console.log(app.foo);
|
|
||||||
* //=> 'bar'
|
|
||||||
* ```
|
|
||||||
* @name #use
|
|
||||||
* @param {Function} `fn` Plugin function to use on each instance.
|
|
||||||
* @return {Object} Returns the `Base` constructor for chaining
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
define(Base, 'use', function(fn) {
|
|
||||||
fns.push(fn);
|
|
||||||
return Base;
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run an array of functions by passing each function
|
|
||||||
* to a method on the given object specified by the given property.
|
|
||||||
*
|
|
||||||
* @param {Object} `obj` Object containing method to use.
|
|
||||||
* @param {String} `prop` Name of the method on the object to use.
|
|
||||||
* @param {Array} `arr` Array of functions to pass to the method.
|
|
||||||
*/
|
|
||||||
|
|
||||||
define(Base, 'run', function(obj, prop, arr) {
|
|
||||||
var len = arr.length, i = 0;
|
|
||||||
while (len--) {
|
|
||||||
obj[prop](arr[i++]);
|
|
||||||
}
|
|
||||||
return Base;
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static method for inheriting the prototype and static methods of the `Base` class.
|
|
||||||
* This method greatly simplifies the process of creating inheritance-based applications.
|
|
||||||
* See [static-extend][] for more details.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* var extend = cu.extend(Parent);
|
|
||||||
* Parent.extend(Child);
|
|
||||||
*
|
|
||||||
* // optional methods
|
|
||||||
* Parent.extend(Child, {
|
|
||||||
* foo: function() {},
|
|
||||||
* bar: function() {}
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* @name #extend
|
|
||||||
* @param {Function} `Ctor` constructor to extend
|
|
||||||
* @param {Object} `methods` Optional prototype properties to mix in.
|
|
||||||
* @return {Object} Returns the `Base` constructor for chaining
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) {
|
|
||||||
Ctor.prototype.mixins = Ctor.prototype.mixins || [];
|
|
||||||
|
|
||||||
define(Ctor, 'mixin', function(fn) {
|
|
||||||
var mixin = fn(Ctor.prototype, Ctor);
|
|
||||||
if (typeof mixin === 'function') {
|
|
||||||
Ctor.prototype.mixins.push(mixin);
|
|
||||||
}
|
|
||||||
return Ctor;
|
|
||||||
});
|
|
||||||
|
|
||||||
define(Ctor, 'mixins', function(Child) {
|
|
||||||
Base.run(Child, 'mixin', Ctor.prototype.mixins);
|
|
||||||
return Ctor;
|
|
||||||
});
|
|
||||||
|
|
||||||
Ctor.prototype.mixin = function(key, value) {
|
|
||||||
Ctor.prototype[key] = value;
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
return Base;
|
|
||||||
}));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used for adding methods to the `Base` prototype, and/or to the prototype of child instances.
|
|
||||||
* When a mixin function returns a function, the returned function is pushed onto the `.mixins`
|
|
||||||
* array, making it available to be used on inheriting classes whenever `Base.mixins()` is
|
|
||||||
* called (e.g. `Base.mixins(Child)`).
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* Base.mixin(function(proto) {
|
|
||||||
* proto.foo = function(msg) {
|
|
||||||
* return 'foo ' + msg;
|
|
||||||
* };
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* @name #mixin
|
|
||||||
* @param {Function} `fn` Function to call
|
|
||||||
* @return {Object} Returns the `Base` constructor for chaining
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
define(Base, 'mixin', function(fn) {
|
|
||||||
var mixin = fn(Base.prototype, Base);
|
|
||||||
if (typeof mixin === 'function') {
|
|
||||||
Base.prototype.mixins.push(mixin);
|
|
||||||
}
|
|
||||||
return Base;
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static method for running global mixin functions against a child constructor.
|
|
||||||
* Mixins must be registered before calling this method.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* Base.extend(Child);
|
|
||||||
* Base.mixins(Child);
|
|
||||||
* ```
|
|
||||||
* @name #mixins
|
|
||||||
* @param {Function} `Child` Constructor function of a child class
|
|
||||||
* @return {Object} Returns the `Base` constructor for chaining
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
define(Base, 'mixins', function(Child) {
|
|
||||||
Base.run(Child, 'mixin', Base.prototype.mixins);
|
|
||||||
return Base;
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Similar to `util.inherit`, but copies all static properties, prototype properties, and
|
|
||||||
* getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details.
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* Base.inherit(Foo, Bar);
|
|
||||||
* ```
|
|
||||||
* @name #inherit
|
|
||||||
* @param {Function} `Receiver` Receiving (child) constructor
|
|
||||||
* @param {Function} `Provider` Providing (parent) constructor
|
|
||||||
* @return {Object} Returns the `Base` constructor for chaining
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
define(Base, 'inherit', cu.inherit);
|
|
||||||
define(Base, 'bubble', cu.bubble);
|
|
||||||
return Base;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Expose `Base` with default settings
|
|
||||||
*/
|
|
||||||
|
|
||||||
module.exports = namespace();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allow users to define a namespace
|
|
||||||
*/
|
|
||||||
|
|
||||||
module.exports.namespace = namespace;
|
|
21
node_modules/base/node_modules/define-property/LICENSE
generated
vendored
21
node_modules/base/node_modules/define-property/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015, 2017, Jon Schlinkert
|
|
||||||
|
|
||||||
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.
|
|
95
node_modules/base/node_modules/define-property/README.md
generated
vendored
95
node_modules/base/node_modules/define-property/README.md
generated
vendored
@ -1,95 +0,0 @@
|
|||||||
# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property)
|
|
||||||
|
|
||||||
> Define a non-enumerable property on an object.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save define-property
|
|
||||||
```
|
|
||||||
|
|
||||||
Install with [yarn](https://yarnpkg.com):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ yarn add define-property
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
**Params**
|
|
||||||
|
|
||||||
* `obj`: The object on which to define the property.
|
|
||||||
* `prop`: The name of the property to be defined or modified.
|
|
||||||
* `descriptor`: The descriptor for the property being defined or modified.
|
|
||||||
|
|
||||||
```js
|
|
||||||
var define = require('define-property');
|
|
||||||
var obj = {};
|
|
||||||
define(obj, 'foo', function(val) {
|
|
||||||
return val.toUpperCase();
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(obj);
|
|
||||||
//=> {}
|
|
||||||
|
|
||||||
console.log(obj.foo('bar'));
|
|
||||||
//=> 'BAR'
|
|
||||||
```
|
|
||||||
|
|
||||||
**get/set**
|
|
||||||
|
|
||||||
```js
|
|
||||||
define(obj, 'foo', {
|
|
||||||
get: function() {},
|
|
||||||
set: function() {}
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.")
|
|
||||||
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
|
|
||||||
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.")
|
|
||||||
* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.")
|
|
||||||
|
|
||||||
### Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
### Building docs
|
|
||||||
|
|
||||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
||||||
|
|
||||||
To generate the readme, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running tests
|
|
||||||
|
|
||||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT License](LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._
|
|
31
node_modules/base/node_modules/define-property/index.js
generated
vendored
31
node_modules/base/node_modules/define-property/index.js
generated
vendored
@ -1,31 +0,0 @@
|
|||||||
/*!
|
|
||||||
* define-property <https://github.com/jonschlinkert/define-property>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var isDescriptor = require('is-descriptor');
|
|
||||||
|
|
||||||
module.exports = function defineProperty(obj, prop, val) {
|
|
||||||
if (typeof obj !== 'object' && typeof obj !== 'function') {
|
|
||||||
throw new TypeError('expected an object or function.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof prop !== 'string') {
|
|
||||||
throw new TypeError('expected `prop` to be a string.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isDescriptor(val) && ('set' in val || 'get' in val)) {
|
|
||||||
return Object.defineProperty(obj, prop, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Object.defineProperty(obj, prop, {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: false,
|
|
||||||
writable: true,
|
|
||||||
value: val
|
|
||||||
});
|
|
||||||
};
|
|
93
node_modules/base/node_modules/define-property/package.json
generated
vendored
93
node_modules/base/node_modules/define-property/package.json
generated
vendored
@ -1,93 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "define-property@^1.0.0",
|
|
||||||
"_id": "define-property@1.0.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
|
|
||||||
"_location": "/base/define-property",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "define-property@^1.0.0",
|
|
||||||
"name": "define-property",
|
|
||||||
"escapedName": "define-property",
|
|
||||||
"rawSpec": "^1.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/base"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
|
|
||||||
"_shasum": "769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6",
|
|
||||||
"_spec": "define-property@^1.0.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\base",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/define-property/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {
|
|
||||||
"is-descriptor": "^1.0.0"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Define a non-enumerable property on an object.",
|
|
||||||
"devDependencies": {
|
|
||||||
"gulp-format-md": "^0.1.12",
|
|
||||||
"mocha": "^3.2.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/define-property",
|
|
||||||
"keywords": [
|
|
||||||
"define",
|
|
||||||
"define-property",
|
|
||||||
"enumerable",
|
|
||||||
"key",
|
|
||||||
"non",
|
|
||||||
"non-enumerable",
|
|
||||||
"object",
|
|
||||||
"prop",
|
|
||||||
"property",
|
|
||||||
"value"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "define-property",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/define-property.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"extend-shallow",
|
|
||||||
"merge-deep",
|
|
||||||
"assign-deep",
|
|
||||||
"mixin-deep"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"toc": false,
|
|
||||||
"layout": "default",
|
|
||||||
"tasks": [
|
|
||||||
"readme"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"gulp-format-md"
|
|
||||||
],
|
|
||||||
"lint": {
|
|
||||||
"reflinks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "1.0.0"
|
|
||||||
}
|
|
21
node_modules/base/node_modules/is-accessor-descriptor/LICENSE
generated
vendored
21
node_modules/base/node_modules/is-accessor-descriptor/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
|
||||||
|
|
||||||
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.
|
|
144
node_modules/base/node_modules/is-accessor-descriptor/README.md
generated
vendored
144
node_modules/base/node_modules/is-accessor-descriptor/README.md
generated
vendored
@ -1,144 +0,0 @@
|
|||||||
# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-accessor-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor)
|
|
||||||
|
|
||||||
> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.
|
|
||||||
|
|
||||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save is-accessor-descriptor
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var isAccessor = require('is-accessor-descriptor');
|
|
||||||
|
|
||||||
isAccessor({get: function() {}});
|
|
||||||
//=> true
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also pass an object and property name to check if the property is an accessor:
|
|
||||||
|
|
||||||
```js
|
|
||||||
isAccessor(foo, 'bar');
|
|
||||||
```
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
`false` when not an object
|
|
||||||
|
|
||||||
```js
|
|
||||||
isAccessor('a')
|
|
||||||
isAccessor(null)
|
|
||||||
isAccessor([])
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
`true` when the object has valid properties
|
|
||||||
|
|
||||||
and the properties all have the correct JavaScript types:
|
|
||||||
|
|
||||||
```js
|
|
||||||
isAccessor({get: noop, set: noop})
|
|
||||||
isAccessor({get: noop})
|
|
||||||
isAccessor({set: noop})
|
|
||||||
//=> true
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when the object has invalid properties
|
|
||||||
|
|
||||||
```js
|
|
||||||
isAccessor({get: noop, set: noop, bar: 'baz'})
|
|
||||||
isAccessor({get: noop, writable: true})
|
|
||||||
isAccessor({get: noop, value: true})
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when an accessor is not a function
|
|
||||||
|
|
||||||
```js
|
|
||||||
isAccessor({get: noop, set: 'baz'})
|
|
||||||
isAccessor({get: 'foo', set: noop})
|
|
||||||
isAccessor({get: 'foo', bar: 'baz'})
|
|
||||||
isAccessor({get: 'foo', set: 'baz'})
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when a value is not the correct type
|
|
||||||
|
|
||||||
```js
|
|
||||||
isAccessor({get: noop, set: noop, enumerable: 'foo'})
|
|
||||||
isAccessor({set: noop, configurable: 'foo'})
|
|
||||||
isAccessor({get: noop, configurable: 'foo'})
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><strong>Contributing</strong></summary>
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><strong>Running Tests</strong></summary>
|
|
||||||
|
|
||||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><strong>Building docs</strong></summary>
|
|
||||||
|
|
||||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
||||||
|
|
||||||
To generate the readme, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
You might also be interested in these projects:
|
|
||||||
|
|
||||||
* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.")
|
|
||||||
* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.")
|
|
||||||
* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.")
|
|
||||||
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
|
|
||||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
|
|
||||||
| **Commits** | **Contributor** |
|
|
||||||
| --- | --- |
|
|
||||||
| 22 | [jonschlinkert](https://github.com/jonschlinkert) |
|
|
||||||
| 2 | [realityking](https://github.com/realityking) |
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT License](LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._
|
|
69
node_modules/base/node_modules/is-accessor-descriptor/index.js
generated
vendored
69
node_modules/base/node_modules/is-accessor-descriptor/index.js
generated
vendored
@ -1,69 +0,0 @@
|
|||||||
/*!
|
|
||||||
* is-accessor-descriptor <https://github.com/jonschlinkert/is-accessor-descriptor>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2015-2017, Jon Schlinkert.
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var typeOf = require('kind-of');
|
|
||||||
|
|
||||||
// accessor descriptor properties
|
|
||||||
var accessor = {
|
|
||||||
get: 'function',
|
|
||||||
set: 'function',
|
|
||||||
configurable: 'boolean',
|
|
||||||
enumerable: 'boolean'
|
|
||||||
};
|
|
||||||
|
|
||||||
function isAccessorDescriptor(obj, prop) {
|
|
||||||
if (typeof prop === 'string') {
|
|
||||||
var val = Object.getOwnPropertyDescriptor(obj, prop);
|
|
||||||
return typeof val !== 'undefined';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeOf(obj) !== 'object') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (has(obj, 'value') || has(obj, 'writable')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!has(obj, 'get') || typeof obj.get !== 'function') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// tldr: it's valid to have "set" be undefined
|
|
||||||
// "set" might be undefined if `Object.getOwnPropertyDescriptor`
|
|
||||||
// was used to get the value, and only `get` was defined by the user
|
|
||||||
if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var key in obj) {
|
|
||||||
if (!accessor.hasOwnProperty(key)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeOf(obj[key]) === accessor[key]) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof obj[key] !== 'undefined') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function has(obj, key) {
|
|
||||||
return {}.hasOwnProperty.call(obj, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Expose `isAccessorDescriptor`
|
|
||||||
*/
|
|
||||||
|
|
||||||
module.exports = isAccessorDescriptor;
|
|
110
node_modules/base/node_modules/is-accessor-descriptor/package.json
generated
vendored
110
node_modules/base/node_modules/is-accessor-descriptor/package.json
generated
vendored
@ -1,110 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "is-accessor-descriptor@^1.0.0",
|
|
||||||
"_id": "is-accessor-descriptor@1.0.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
|
|
||||||
"_location": "/base/is-accessor-descriptor",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "is-accessor-descriptor@^1.0.0",
|
|
||||||
"name": "is-accessor-descriptor",
|
|
||||||
"escapedName": "is-accessor-descriptor",
|
|
||||||
"rawSpec": "^1.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/base/is-descriptor"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
|
|
||||||
"_shasum": "169c2f6d3df1f992618072365c9b0ea1f6878656",
|
|
||||||
"_spec": "is-accessor-descriptor@^1.0.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\base\\node_modules\\is-descriptor",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "http://twitter.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Rouven Weßling",
|
|
||||||
"url": "www.rouvenwessling.de"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"kind-of": "^6.0.0"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.",
|
|
||||||
"devDependencies": {
|
|
||||||
"gulp-format-md": "^1.0.0",
|
|
||||||
"mocha": "^3.5.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/is-accessor-descriptor",
|
|
||||||
"keywords": [
|
|
||||||
"accessor",
|
|
||||||
"check",
|
|
||||||
"data",
|
|
||||||
"descriptor",
|
|
||||||
"get",
|
|
||||||
"getter",
|
|
||||||
"is",
|
|
||||||
"keys",
|
|
||||||
"object",
|
|
||||||
"properties",
|
|
||||||
"property",
|
|
||||||
"set",
|
|
||||||
"setter",
|
|
||||||
"type",
|
|
||||||
"valid",
|
|
||||||
"value"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "is-accessor-descriptor",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/is-accessor-descriptor.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"toc": false,
|
|
||||||
"layout": "default",
|
|
||||||
"tasks": [
|
|
||||||
"readme"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"gulp-format-md"
|
|
||||||
],
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"is-accessor-descriptor",
|
|
||||||
"is-data-descriptor",
|
|
||||||
"is-descriptor",
|
|
||||||
"is-plain-object",
|
|
||||||
"isobject"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"reflinks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "1.0.0"
|
|
||||||
}
|
|
21
node_modules/base/node_modules/is-data-descriptor/LICENSE
generated
vendored
21
node_modules/base/node_modules/is-data-descriptor/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
|
||||||
|
|
||||||
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.
|
|
161
node_modules/base/node_modules/is-data-descriptor/README.md
generated
vendored
161
node_modules/base/node_modules/is-data-descriptor/README.md
generated
vendored
@ -1,161 +0,0 @@
|
|||||||
# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-data-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-data-descriptor)
|
|
||||||
|
|
||||||
> Returns true if a value has the characteristics of a valid JavaScript data descriptor.
|
|
||||||
|
|
||||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save is-data-descriptor
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var isDataDesc = require('is-data-descriptor');
|
|
||||||
```
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
`true` when the descriptor has valid properties with valid values.
|
|
||||||
|
|
||||||
```js
|
|
||||||
// `value` can be anything
|
|
||||||
isDataDesc({value: 'foo'})
|
|
||||||
isDataDesc({value: function() {}})
|
|
||||||
isDataDesc({value: true})
|
|
||||||
//=> true
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when not an object
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDataDesc('a')
|
|
||||||
//=> false
|
|
||||||
isDataDesc(null)
|
|
||||||
//=> false
|
|
||||||
isDataDesc([])
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when the object has invalid properties
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDataDesc({value: 'foo', bar: 'baz'})
|
|
||||||
//=> false
|
|
||||||
isDataDesc({value: 'foo', bar: 'baz'})
|
|
||||||
//=> false
|
|
||||||
isDataDesc({value: 'foo', get: function(){}})
|
|
||||||
//=> false
|
|
||||||
isDataDesc({get: function(){}, value: 'foo'})
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when a value is not the correct type
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDataDesc({value: 'foo', enumerable: 'foo'})
|
|
||||||
//=> false
|
|
||||||
isDataDesc({value: 'foo', configurable: 'foo'})
|
|
||||||
//=> false
|
|
||||||
isDataDesc({value: 'foo', writable: 'foo'})
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
## Valid properties
|
|
||||||
|
|
||||||
The only valid data descriptor properties are the following:
|
|
||||||
|
|
||||||
* `configurable` (required)
|
|
||||||
* `enumerable` (required)
|
|
||||||
* `value` (optional)
|
|
||||||
* `writable` (optional)
|
|
||||||
|
|
||||||
To be a valid data descriptor, either `value` or `writable` must be defined.
|
|
||||||
|
|
||||||
**Invalid properties**
|
|
||||||
|
|
||||||
A descriptor may have additional _invalid_ properties (an error will **not** be thrown).
|
|
||||||
|
|
||||||
```js
|
|
||||||
var foo = {};
|
|
||||||
|
|
||||||
Object.defineProperty(foo, 'bar', {
|
|
||||||
enumerable: true,
|
|
||||||
whatever: 'blah', // invalid, but doesn't cause an error
|
|
||||||
get: function() {
|
|
||||||
return 'baz';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(foo.bar);
|
|
||||||
//=> 'baz'
|
|
||||||
```
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><strong>Contributing</strong></summary>
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><strong>Running Tests</strong></summary>
|
|
||||||
|
|
||||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><strong>Building docs</strong></summary>
|
|
||||||
|
|
||||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
||||||
|
|
||||||
To generate the readme, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
You might also be interested in these projects:
|
|
||||||
|
|
||||||
* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.")
|
|
||||||
* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.")
|
|
||||||
* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.")
|
|
||||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
|
|
||||||
| **Commits** | **Contributor** |
|
|
||||||
| --- | --- |
|
|
||||||
| 21 | [jonschlinkert](https://github.com/jonschlinkert) |
|
|
||||||
| 2 | [realityking](https://github.com/realityking) |
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT License](LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._
|
|
49
node_modules/base/node_modules/is-data-descriptor/index.js
generated
vendored
49
node_modules/base/node_modules/is-data-descriptor/index.js
generated
vendored
@ -1,49 +0,0 @@
|
|||||||
/*!
|
|
||||||
* is-data-descriptor <https://github.com/jonschlinkert/is-data-descriptor>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2015-2017, Jon Schlinkert.
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var typeOf = require('kind-of');
|
|
||||||
|
|
||||||
module.exports = function isDataDescriptor(obj, prop) {
|
|
||||||
// data descriptor properties
|
|
||||||
var data = {
|
|
||||||
configurable: 'boolean',
|
|
||||||
enumerable: 'boolean',
|
|
||||||
writable: 'boolean'
|
|
||||||
};
|
|
||||||
|
|
||||||
if (typeOf(obj) !== 'object') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof prop === 'string') {
|
|
||||||
var val = Object.getOwnPropertyDescriptor(obj, prop);
|
|
||||||
return typeof val !== 'undefined';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!('value' in obj) && !('writable' in obj)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var key in obj) {
|
|
||||||
if (key === 'value') continue;
|
|
||||||
|
|
||||||
if (!data.hasOwnProperty(key)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeOf(obj[key]) === data[key]) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof obj[key] !== 'undefined') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
109
node_modules/base/node_modules/is-data-descriptor/package.json
generated
vendored
109
node_modules/base/node_modules/is-data-descriptor/package.json
generated
vendored
@ -1,109 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "is-data-descriptor@^1.0.0",
|
|
||||||
"_id": "is-data-descriptor@1.0.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
|
|
||||||
"_location": "/base/is-data-descriptor",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "is-data-descriptor@^1.0.0",
|
|
||||||
"name": "is-data-descriptor",
|
|
||||||
"escapedName": "is-data-descriptor",
|
|
||||||
"rawSpec": "^1.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/base/is-descriptor"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
|
|
||||||
"_shasum": "d84876321d0e7add03990406abbbbd36ba9268c7",
|
|
||||||
"_spec": "is-data-descriptor@^1.0.0",
|
|
||||||
"_where": "C:\\Users\\User\\Documents\\Git\\asdf-games\\node_modules\\base\\node_modules\\is-descriptor",
|
|
||||||
"author": {
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "https://github.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jonschlinkert/is-data-descriptor/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Jon Schlinkert",
|
|
||||||
"url": "http://twitter.com/jonschlinkert"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Rouven Weßling",
|
|
||||||
"url": "www.rouvenwessling.de"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"kind-of": "^6.0.0"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.",
|
|
||||||
"devDependencies": {
|
|
||||||
"gulp-format-md": "^1.0.0",
|
|
||||||
"mocha": "^3.5.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jonschlinkert/is-data-descriptor",
|
|
||||||
"keywords": [
|
|
||||||
"accessor",
|
|
||||||
"check",
|
|
||||||
"data",
|
|
||||||
"descriptor",
|
|
||||||
"get",
|
|
||||||
"getter",
|
|
||||||
"is",
|
|
||||||
"keys",
|
|
||||||
"object",
|
|
||||||
"properties",
|
|
||||||
"property",
|
|
||||||
"set",
|
|
||||||
"setter",
|
|
||||||
"type",
|
|
||||||
"valid",
|
|
||||||
"value"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "is-data-descriptor",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jonschlinkert/is-data-descriptor.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha"
|
|
||||||
},
|
|
||||||
"verb": {
|
|
||||||
"toc": false,
|
|
||||||
"layout": "default",
|
|
||||||
"tasks": [
|
|
||||||
"readme"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"gulp-format-md"
|
|
||||||
],
|
|
||||||
"related": {
|
|
||||||
"list": [
|
|
||||||
"is-accessor-descriptor",
|
|
||||||
"is-data-descriptor",
|
|
||||||
"is-descriptor",
|
|
||||||
"isobject"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"reflinks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "1.0.0"
|
|
||||||
}
|
|
21
node_modules/base/node_modules/is-descriptor/LICENSE
generated
vendored
21
node_modules/base/node_modules/is-descriptor/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
|
||||||
|
|
||||||
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.
|
|
193
node_modules/base/node_modules/is-descriptor/README.md
generated
vendored
193
node_modules/base/node_modules/is-descriptor/README.md
generated
vendored
@ -1,193 +0,0 @@
|
|||||||
# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor)
|
|
||||||
|
|
||||||
> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install with [npm](https://www.npmjs.com/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install --save is-descriptor
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
var isDescriptor = require('is-descriptor');
|
|
||||||
|
|
||||||
isDescriptor({value: 'foo'})
|
|
||||||
//=> true
|
|
||||||
isDescriptor({get: function(){}, set: function(){}})
|
|
||||||
//=> true
|
|
||||||
isDescriptor({get: 'foo', set: function(){}})
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument.
|
|
||||||
|
|
||||||
```js
|
|
||||||
var obj = {};
|
|
||||||
obj.foo = 'abc';
|
|
||||||
|
|
||||||
Object.defineProperty(obj, 'bar', {
|
|
||||||
value: 'xyz'
|
|
||||||
});
|
|
||||||
|
|
||||||
isDescriptor(obj, 'foo');
|
|
||||||
//=> true
|
|
||||||
isDescriptor(obj, 'bar');
|
|
||||||
//=> true
|
|
||||||
```
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
### value type
|
|
||||||
|
|
||||||
`false` when not an object
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDescriptor('a');
|
|
||||||
//=> false
|
|
||||||
isDescriptor(null);
|
|
||||||
//=> false
|
|
||||||
isDescriptor([]);
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
### data descriptor
|
|
||||||
|
|
||||||
`true` when the object has valid properties with valid values.
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDescriptor({value: 'foo'});
|
|
||||||
//=> true
|
|
||||||
isDescriptor({value: noop});
|
|
||||||
//=> true
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when the object has invalid properties
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDescriptor({value: 'foo', bar: 'baz'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({value: 'foo', bar: 'baz'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({value: 'foo', get: noop});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({get: noop, value: noop});
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when a value is not the correct type
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDescriptor({value: 'foo', enumerable: 'foo'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({value: 'foo', configurable: 'foo'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({value: 'foo', writable: 'foo'});
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
### accessor descriptor
|
|
||||||
|
|
||||||
`true` when the object has valid properties with valid values.
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDescriptor({get: noop, set: noop});
|
|
||||||
//=> true
|
|
||||||
isDescriptor({get: noop});
|
|
||||||
//=> true
|
|
||||||
isDescriptor({set: noop});
|
|
||||||
//=> true
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when the object has invalid properties
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDescriptor({get: noop, set: noop, bar: 'baz'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({get: noop, writable: true});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({get: noop, value: true});
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when an accessor is not a function
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDescriptor({get: noop, set: 'baz'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({get: 'foo', set: noop});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({get: 'foo', bar: 'baz'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({get: 'foo', set: 'baz'});
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
`false` when a value is not the correct type
|
|
||||||
|
|
||||||
```js
|
|
||||||
isDescriptor({get: noop, set: noop, enumerable: 'foo'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({set: noop, configurable: 'foo'});
|
|
||||||
//=> false
|
|
||||||
isDescriptor({get: noop, configurable: 'foo'});
|
|
||||||
//=> false
|
|
||||||
```
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
### Related projects
|
|
||||||
|
|
||||||
* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.")
|
|
||||||
* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.")
|
|
||||||
* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.")
|
|
||||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
|
||||||
|
|
||||||
### Contributing
|
|
||||||
|
|
||||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
|
|
||||||
| **Commits** | **Contributor** |
|
|
||||||
| --- | --- |
|
|
||||||
| 24 | [jonschlinkert](https://github.com/jonschlinkert) |
|
|
||||||
| 1 | [doowb](https://github.com/doowb) |
|
|
||||||
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
|
|
||||||
|
|
||||||
### Building docs
|
|
||||||
|
|
||||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
||||||
|
|
||||||
To generate the readme, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running tests
|
|
||||||
|
|
||||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ npm install && npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Author
|
|
||||||
|
|
||||||
**Jon Schlinkert**
|
|
||||||
|
|
||||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
|
||||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
||||||
Released under the [MIT License](LICENSE).
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user