WhiteDog

studying partials, section

Showing 1000 changed files with 97 additions and 3330 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

1 node_modules 1 node_modules
2 +*~
...\ No newline at end of file ...\ No newline at end of file
......
1 +{
2 + "git.ignoreLimitWarning": true
3 +}
...\ No newline at end of file ...\ No newline at end of file
1 +exports.getWeatherData= function () {
2 + return {
3 + locations: [
4 + {
5 + name: 'Portland',
6 + forecastUrl: 'http://www.wunderground.com/US/OR/Portland.html',
7 + iconUrl: 'http://icons-ak.wxug.com/i/c/k/cloudy.gif',
8 + weather: 'Overcast',
9 + temp: '54.1 F(12.3C',
10 + },
11 + {
12 + name: 'Bend',
13 + forecastUrl: 'http://www.wunderground.com/US/OR/Portland.html',
14 + iconUrl: 'http://icons-ak.wxug.com/i/c/k/partlycloudy.gif',
15 + weather: 'Partly Cloudy',
16 + temp: '55.0 F(12.3C',
17 + },
18 + {
19 + name: 'Manzanita',
20 + forecastUrl: 'http://www.wunderground.com/US/OR/Portland.html',
21 + iconUrl: 'http://icons-ak.wxug.com/i/c/k/rain.gif',
22 + weather: 'Light Rain',
23 + temp: '55.0 F(12.3C',
24 + },
25 + ],
26 + };
27 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -6,43 +6,83 @@ var express = require('express'); ...@@ -6,43 +6,83 @@ var express = require('express');
6 //기본적으로 node_modules 디렉토리에서 찾는다 6 //기본적으로 node_modules 디렉토리에서 찾는다
7 // ./를 붙이면 거기서 찾지 않는다. 7 // ./를 붙이면 거기서 찾지 않는다.
8 var fortune = require('./lib/fortune.js'); 8 var fortune = require('./lib/fortune.js');
9 +var getWeather = require('./lib/getWeather.js');
9 10
10 //if(app.thing ====null) console.log('bleat'); 11 //if(app.thing ====null) console.log('bleat');
11 -
12 var app = express(); 12 var app = express();
13 app.use(express.static(__dirname + '/public')); 13 app.use(express.static(__dirname + '/public'));
14 14
15 -var handlebars = require('express-handlebars').create({ defaultLayout: 'main' }); 15 +//뷰를 렌더링 할때 사용할 기본 레이아웃
16 +//기본적으로 익스프레스는 views 에서 뷰를 찾고, views/layouts에서 레이아웃을 찾는다.
17 +var handlebars = require('express-handlebars').create({
18 + defaultLayout: 'main',
19 + helpers: {
20 + section: function (name, options) {
21 + if (!this._sections) this._sections = {};
22 + this._sections[name] = options.fn(this);
23 + return null;
24 + }
25 + }
26 +});
16 app.engine('handlebars', handlebars.engine); 27 app.engine('handlebars', handlebars.engine);
17 app.set('view engine', 'handlebars'); 28 app.set('view engine', 'handlebars');
18 29
19 app.set('port', process.env.PORT || 3000); 30 app.set('port', process.env.PORT || 3000);
20 31
21 //쿼리스트링 감지하는 미들웨어는 이것을 사용할 라우터 보다 앞에 있어야함. 32 //쿼리스트링 감지하는 미들웨어는 이것을 사용할 라우터 보다 앞에 있어야함.
22 -app.use(function(req,res,next){ 33 +app.use(function (req, res, next) {
23 -res.locals.showTests = app.get('env') !=='production' && req.query.test === '1'; 34 + res.locals.showTests = app.get('env') !== 'production' && req.query.test === '1';
24 -next(); 35 + next();
36 +});
37 +//파셜 쓰기.
38 +//여러페이지에 나타나지만 모든 페이지에 나타나지 않는다면 이 방법 고려.
39 +app.use(function (req, res, next) {
40 + if (!res.locals.partials) res.locals.partials = {};
41 + res.locals.partials.weatherContext = getWeather.getWeatherData();
42 + next();
25 }); 43 });
26 44
27 45
28 app.get('/', function (req, res) { 46 app.get('/', function (req, res) {
29 - res.render('home'); 47 +
48 + //변수를 만들고!~!!
49 + var product =
50 + {
51 + currency: {
52 + name: 'United States dollars',
53 + abbrev: 'USD',
54 + },
55 + tours: [
56 + { name: 'Hood River', price: '$99.95' },
57 + { name: 'Oregon Coast', price: '$159.95' },],
58 + specialsUrl: '/about',
59 + currencies: ['USD', 'GBP', 'BTC'],
60 + };
61 + res.render('home', {
62 + //http에 전달해야하는 변수 이름을 알고있으니까 그 변수에다가 내가 값을넣어준다.
63 + tours: product.tours,
64 + currency: product.currency,
65 + specialsUrl: product.specialsUrl,
66 + currencies: product.currencies
67 + });
30 }); 68 });
31 69
32 -app.get('/tours/hood-river', function(req,res){ 70 +app.get('/tours/hood-river', function (req, res) {
33 - res.render('tours/hood-river'); 71 + //레이아웃을 쓰지 않으려면 layout:null 넘김
72 + //null 말고 layouts 서브디렉토리에 있는 다른 레이아웃을 써도됨.
73 + res.render('tours/hood-river', { layout: null });
34 }); 74 });
35 -app.get('/tours/oregon-coast', function(req,res){ 75 +app.get('/tours/oregon-coast', function (req, res) {
36 res.render('tours/oregon-coast'); 76 res.render('tours/oregon-coast');
37 }); 77 });
38 -app.get('/tours/request-group-rate',function(req,res){ 78 +app.get('/tours/request-group-rate', function (req, res) {
39 res.render('tours/request-group-rate'); 79 res.render('tours/request-group-rate');
40 }); 80 });
41 81
42 app.get('/about', function (req, res) { 82 app.get('/about', function (req, res) {
43 // var randomFortune = fortunes[Math.floor(Math.random() * fortunes.length)]; 83 // var randomFortune = fortunes[Math.floor(Math.random() * fortunes.length)];
44 res.render('about', { 84 res.render('about', {
45 - fortune : fortune.getFortune(), 85 + fortune: fortune.getFortune(),
46 pageTestScript: '/qa/tests-about.js' 86 pageTestScript: '/qa/tests-about.js'
47 }); 87 });
48 }); 88 });
......
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../babel/bin/babel.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../babel/bin/babel.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../babel/bin/babel-external-helpers.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../babel/bin/babel-external-helpers.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\babel\bin\babel-external-helpers.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\babel\bin\babel-external-helpers.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../babel/bin/babel-node.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../babel/bin/babel-node.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\babel\bin\babel-node.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\babel\bin\babel-node.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../babel/bin/babel-plugin.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../babel/bin/babel-plugin.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\babel\bin\babel-plugin.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\babel\bin\babel-plugin.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\babel\bin\babel.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\babel\bin\babel.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../commoner/bin/commonize" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../commoner/bin/commonize" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\commoner\bin\commonize" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\commoner\bin\commonize" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../defs/build/es5/defs" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../defs/build/es5/defs" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\defs\build\es5\defs" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\defs\build\es5\defs" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../detect-indent/cli.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../detect-indent/cli.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\detect-indent\cli.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\detect-indent\cli.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../jsesc/bin/jsesc" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\jsesc\bin\jsesc" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\jsesc\bin\jsesc" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../json5/lib/cli.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\json5\lib\cli.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\json5\lib\cli.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../leven/cli.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../leven/cli.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\leven\cli.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\leven\cli.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../linkchecker/index.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../linkchecker/index.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\linkchecker\index.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\linkchecker\index.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../os-name/cli.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../os-name/cli.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\os-name\cli.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\os-name\cli.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../osx-release/cli.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../osx-release/cli.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\osx-release\cli.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\osx-release\cli.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../regenerator/bin/regenerator" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../regenerator/bin/regenerator" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\regenerator\bin\regenerator" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\regenerator\bin\regenerator" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../regexpu/bin/regexpu" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../regexpu/bin/regexpu" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\regexpu\bin\regexpu" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\regexpu\bin\regexpu" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../regjsparser/bin/parser" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../regjsparser/bin/parser" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\regjsparser\bin\parser" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\regjsparser\bin\parser" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../user-home/cli.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../user-home/cli.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\user-home\cli.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\user-home\cli.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../window-size/cli.js" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../window-size/cli.js" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@IF EXIST "%~dp0\node.exe" (
2 - "%~dp0\node.exe" "%~dp0\..\window-size\cli.js" %*
3 -) ELSE (
4 - @SETLOCAL
5 - @SET PATHEXT=%PATHEXT:;.JS;=;%
6 - node "%~dp0\..\window-size\cli.js" %*
7 -)
...\ No newline at end of file ...\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", 21 "_resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz",
22 "_shasum": "5faad9c2c07f60dd76770f71cf025b62a63cfd4e", 22 "_shasum": "5faad9c2c07f60dd76770f71cf025b62a63cfd4e",
23 "_spec": "abab@^1.0.0", 23 "_spec": "abab@^1.0.0",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\jsdom", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\jsdom",
25 "author": { 25 "author": {
26 "name": "Jeff Carpenter", 26 "name": "Jeff Carpenter",
27 "email": "gcarpenterv@gmail.com" 27 "email": "gcarpenterv@gmail.com"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 21 "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
22 "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8", 22 "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8",
23 "_spec": "abbrev@1", 23 "_spec": "abbrev@1",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\nopt", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\nopt",
25 "author": { 25 "author": {
26 "name": "Isaac Z. Schlueter", 26 "name": "Isaac Z. Schlueter",
27 "email": "i@izs.me" 27 "email": "i@izs.me"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", 21 "_resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz",
22 "_shasum": "55bb5e98691507b74579d0513413217c380c54cf", 22 "_shasum": "55bb5e98691507b74579d0513413217c380c54cf",
23 "_spec": "acorn-globals@^1.0.4", 23 "_spec": "acorn-globals@^1.0.4",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\jsdom", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\jsdom",
25 "author": { 25 "author": {
26 "name": "ForbesLindesay" 26 "name": "ForbesLindesay"
27 }, 27 },
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 "_resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", 22 "_resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz",
23 "_shasum": "ab6e7d9d886aaca8b085bc3312b79a198433f0e7", 23 "_shasum": "ab6e7d9d886aaca8b085bc3312b79a198433f0e7",
24 "_spec": "acorn@^2.4.0", 24 "_spec": "acorn@^2.4.0",
25 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\jsdom", 25 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\jsdom",
26 "bin": { 26 "bin": {
27 "acorn": "./bin/acorn" 27 "acorn": "./bin/acorn"
28 }, 28 },
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz", 21 "_resolved": "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz",
22 "_shasum": "4414ff74a50879c208ee5fdc826e32c303549eda", 22 "_shasum": "4414ff74a50879c208ee5fdc826e32c303549eda",
23 "_spec": "ajv@^5.1.0", 23 "_spec": "ajv@^5.1.0",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\har-validator", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\har-validator",
25 "author": { 25 "author": {
26 "name": "Evgeny Poberezkin" 26 "name": "Evgeny Poberezkin"
27 }, 27 },
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 "_resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", 22 "_resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
23 "_shasum": "0cd90a561093f35d0a99256c22b7069433fad117", 23 "_shasum": "0cd90a561093f35d0a99256c22b7069433fad117",
24 "_spec": "align-text@^0.1.3", 24 "_spec": "align-text@^0.1.3",
25 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\center-align", 25 + "_where": "D:\\W\\project\\comnetprj\\node_modules\\center-align",
26 "author": { 26 "author": {
27 "name": "Jon Schlinkert", 27 "name": "Jon Schlinkert",
28 "url": "https://github.com/jonschlinkert" 28 "url": "https://github.com/jonschlinkert"
......
1 -Copyright (c) 2013 Olov Lassus <olov.lassus@gmail.com>
2 -
3 -Permission is hereby granted, free of charge, to any person obtaining a copy
4 -of this software and associated documentation files (the "Software"), to deal
5 -in the Software without restriction, including without limitation the rights
6 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 -copies of the Software, and to permit persons to whom the Software is
8 -furnished to do so, subject to the following conditions:
9 -
10 -The above copyright notice and this permission notice shall be included in
11 -all copies or substantial portions of the Software.
12 -
13 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 -THE SOFTWARE.
1 -# alter.js
2 -Alters a string by replacing multiple range fragments in one fast pass.
3 -Works in node and browsers.
4 -
5 -
6 -
7 -## Usage
8 -```javascript
9 - var alter = require("alter");
10 - alter("0123456789", [
11 - {start: 1, end: 3, str: "first"},
12 - {start: 5, end: 9, str: "second"},
13 - ]); // => "0first34second9"
14 -```
15 -
16 -The fragments does not need to be sorted but must not overlap. More examples in `test/alter-tests.js`
17 -
18 -
19 -## Installation
20 -
21 -### Node
22 -Install using npm
23 -
24 - npm install alter
25 -
26 -```javascript
27 -var alter = require("alter");
28 -```
29 -
30 -### Browser
31 -Clone the repo and include it in a script tag
32 -
33 - git clone https://github.com/olov/alter.git
34 -
35 -```html
36 -<script src="alter/alter.js"></script>
37 -```
1 -// alter.js
2 -// MIT licensed, see LICENSE file
3 -// Copyright (c) 2013 Olov Lassus <olov.lassus@gmail.com>
4 -
5 -var assert = require("assert");
6 -var stableSort = require("stable");
7 -
8 -// fragments is a list of {start: index, end: index, str: string to replace with}
9 -function alter(str, fragments) {
10 - "use strict";
11 -
12 - var isArray = Array.isArray || function(v) {
13 - return Object.prototype.toString.call(v) === "[object Array]";
14 - };;
15 -
16 - assert(typeof str === "string");
17 - assert(isArray(fragments));
18 -
19 - // stableSort isn't in-place so no need to copy array first
20 - var sortedFragments = stableSort(fragments, function(a, b) {
21 - return a.start - b.start;
22 - });
23 -
24 - var outs = [];
25 -
26 - var pos = 0;
27 - for (var i = 0; i < sortedFragments.length; i++) {
28 - var frag = sortedFragments[i];
29 -
30 - assert(pos <= frag.start);
31 - assert(frag.start <= frag.end);
32 - outs.push(str.slice(pos, frag.start));
33 - outs.push(frag.str);
34 - pos = frag.end;
35 - }
36 - if (pos < str.length) {
37 - outs.push(str.slice(pos));
38 - }
39 -
40 - return outs.join("");
41 -}
42 -
43 -if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
44 - module.exports = alter;
45 -}
1 -{
2 - "_from": "alter@~0.2.0",
3 - "_id": "alter@0.2.0",
4 - "_inBundle": false,
5 - "_integrity": "sha1-x1iICGF1cgNKrmJICvJrHU0cs80=",
6 - "_location": "/alter",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "alter@~0.2.0",
12 - "name": "alter",
13 - "escapedName": "alter",
14 - "rawSpec": "~0.2.0",
15 - "saveSpec": null,
16 - "fetchSpec": "~0.2.0"
17 - },
18 - "_requiredBy": [
19 - "/defs"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/alter/-/alter-0.2.0.tgz",
22 - "_shasum": "c7588808617572034aae62480af26b1d4d1cb3cd",
23 - "_spec": "alter@~0.2.0",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\defs",
25 - "author": {
26 - "name": "Olov Lassus",
27 - "email": "olov.lassus@gmail.com"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/olov/alter/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "stable": "~0.1.3"
35 - },
36 - "deprecated": false,
37 - "description": "alters a string by replacing multiple range fragments in one fast pass",
38 - "devDependencies": {
39 - "tap": "~0.4.0"
40 - },
41 - "homepage": "https://github.com/olov/alter#readme",
42 - "keywords": [
43 - "string",
44 - "manipulation",
45 - "replace",
46 - "alter",
47 - "modify"
48 - ],
49 - "license": "MIT",
50 - "main": "alter.js",
51 - "name": "alter",
52 - "repository": {
53 - "type": "git",
54 - "url": "git+https://github.com/olov/alter.git"
55 - },
56 - "scripts": {
57 - "test": "tap test/*.js"
58 - },
59 - "version": "0.2.0"
60 -}
1 -"use strict";
2 -
3 -var test = require("tap").test;
4 -var alter = require("../");
5 -
6 -test("simple", function(t) {
7 - t.equal(alter("0123456789", [
8 - {start: 1, end: 3, str: "first"},
9 - {start: 5, end: 9, str: "second"},
10 - ]), "0first34second9");
11 - t.end();
12 -});
13 -
14 -test("not-sorted-order", function(t) {
15 - t.equal(alter("0123456789", [
16 - {start: 5, end: 9, str: "second"},
17 - {start: 1, end: 3, str: "first"},
18 - ]), "0first34second9");
19 - t.end();
20 -});
21 -
22 -test("insert", function(t) {
23 - t.equal(alter("0123456789", [
24 - {start: 5, end: 5, str: "xyz"},
25 - ]), "01234xyz56789");
26 - t.end();
27 -});
28 -
29 -test("delete", function(t) {
30 - t.equal(alter("0123456789", [
31 - {start: 5, end: 6, str: ""},
32 - ]), "012346789");
33 - t.end();
34 -});
35 -
36 -test("nop1", function(t) {
37 - t.equal(alter("0123456789", [
38 - ]), "0123456789");
39 - t.end();
40 -});
41 -
42 -test("nop2", function(t) {
43 - t.equal(alter("0123456789", [
44 - {start: 5, end: 5, str: ""},
45 - ]), "0123456789");
46 - t.end();
47 -});
48 -
49 -test("orderedinsert-stable", function(t) {
50 - t.equal(alter("0123456789", [
51 - {start: 5, end: 5, str: "a"},
52 - {start: 5, end: 5, str: "b"},
53 - {start: 5, end: 5, str: "c"},
54 - {start: 5, end: 6, str: "d"},
55 - ]), "01234abcd6789");
56 - t.end();
57 -});
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
16 "fetchSpec": ">=0.0.4" 16 "fetchSpec": ">=0.0.4"
17 }, 17 },
18 "_requiredBy": [ 18 "_requiredBy": [
19 - "/source-map-support/source-map" 19 + "/source-map"
20 ], 20 ],
21 "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", 21 "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
22 "_shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5", 22 "_shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5",
23 "_spec": "amdefine@>=0.0.4", 23 "_spec": "amdefine@>=0.0.4",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\source-map-support\\node_modules\\source-map", 24 + "_where": "D:\\W\\project\\comnetprj\\node_modules\\source-map",
25 "author": { 25 "author": {
26 "name": "James Burke", 26 "name": "James Burke",
27 "email": "jrburke@gmail.com", 27 "email": "jrburke@gmail.com",
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 22 "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
23 "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", 23 "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
24 "_spec": "ansi-regex@^2.0.0", 24 "_spec": "ansi-regex@^2.0.0",
25 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\has-ansi", 25 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\has-ansi",
26 "author": { 26 "author": {
27 "name": "Sindre Sorhus", 27 "name": "Sindre Sorhus",
28 "email": "sindresorhus@gmail.com", 28 "email": "sindresorhus@gmail.com",
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", 21 "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
22 "_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe", 22 "_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe",
23 "_spec": "ansi-styles@^2.2.1", 23 "_spec": "ansi-styles@^2.2.1",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\chalk", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\chalk",
25 "author": { 25 "author": {
26 "name": "Sindre Sorhus", 26 "name": "Sindre Sorhus",
27 "email": "sindresorhus@gmail.com", 27 "email": "sindresorhus@gmail.com",
......
1 -The ISC License
2 -
3 -Copyright (c) 2014 Elan Shanker
4 -
5 -Permission to use, copy, modify, and/or distribute this software for any
6 -purpose with or without fee is hereby granted, provided that the above
7 -copyright notice and this permission notice appear in all copies.
8 -
9 -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15 -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1 -anymatch [![Build Status](https://travis-ci.org/es128/anymatch.svg?branch=master)](https://travis-ci.org/es128/anymatch) [![Coverage Status](https://img.shields.io/coveralls/es128/anymatch.svg?branch=master)](https://coveralls.io/r/es128/anymatch?branch=master)
2 -======
3 -Javascript module to match a string against a regular expression, glob, string,
4 -or function that takes the string as an argument and returns a truthy or falsy
5 -value. The matcher can also be an array of any or all of these. Useful for
6 -allowing a very flexible user-defined config to define things like file paths.
7 -
8 -[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/)
9 -[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/)
10 -
11 -Usage
12 ------
13 -```sh
14 -npm install anymatch --save
15 -```
16 -
17 -#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex])
18 -* __matchers__: (_Array|String|RegExp|Function_)
19 -String to be directly matched, string with glob patterns, regular expression
20 -test, function that takes the testString as an argument and returns a truthy
21 -value if it should be matched, or an array of any number and mix of these types.
22 -* __testString__: (_String|Array_) The string to test against the matchers. If
23 -passed as an array, the first element of the array will be used as the
24 -`testString` for non-function matchers, while the entire array will be applied
25 -as the arguments for function matchers.
26 -* __returnIndex__: (_Boolean [optional]_) If true, return the array index of
27 -the first matcher that that testString matched, or -1 if no match, instead of a
28 -boolean result.
29 -* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a
30 -subset out of the array of provided matchers to test against. Can be useful
31 -with bound matcher functions (see below). When used with `returnIndex = true`
32 -preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e.
33 -includes array members up to, but not including endIndex).
34 -
35 -```js
36 -var anymatch = require('anymatch');
37 -
38 -var matchers = [
39 - 'path/to/file.js',
40 - 'path/anyjs/**/*.js',
41 - /foo\.js$/,
42 - function (string) {
43 - return string.indexOf('bar') !== -1 && string.length > 10
44 - }
45 -];
46 -
47 -anymatch(matchers, 'path/to/file.js'); // true
48 -anymatch(matchers, 'path/anyjs/baz.js'); // true
49 -anymatch(matchers, 'path/to/foo.js'); // true
50 -anymatch(matchers, 'path/to/bar.js'); // true
51 -anymatch(matchers, 'bar.js'); // false
52 -
53 -// returnIndex = true
54 -anymatch(matchers, 'foo.js', true); // 2
55 -anymatch(matchers, 'path/anyjs/foo.js', true); // 1
56 -
57 -// skip matchers
58 -anymatch(matchers, 'path/to/file.js', false, 1); // false
59 -anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2
60 -anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1
61 -
62 -// using globs to match directories and their children
63 -anymatch('node_modules', 'node_modules'); // true
64 -anymatch('node_modules', 'node_modules/somelib/index.js'); // false
65 -anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true
66 -anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false
67 -anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true
68 -```
69 -
70 -#### anymatch (matchers)
71 -You can also pass in only your matcher(s) to get a curried function that has
72 -already been bound to the provided matching criteria. This can be used as an
73 -`Array.prototype.filter` callback.
74 -
75 -```js
76 -var matcher = anymatch(matchers);
77 -
78 -matcher('path/to/file.js'); // true
79 -matcher('path/anyjs/baz.js', true); // 1
80 -matcher('path/anyjs/baz.js', true, 2); // -1
81 -
82 -['foo.js', 'bar.js'].filter(matcher); // ['foo.js']
83 -```
84 -
85 -Change Log
86 -----------
87 -[See release notes page on GitHub](https://github.com/es128/anymatch/releases)
88 -
89 -NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch)
90 -for glob pattern matching. The glob matching behavior should be functionally
91 -equivalent to the commonly used [minimatch](https://github.com/isaacs/minimatch)
92 -library (aside from some fixed bugs and greater performance), so a major
93 -version bump wasn't merited. Issues with glob pattern matching should be
94 -reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues).
95 -
96 -License
97 --------
98 -[ISC](https://raw.github.com/es128/anymatch/master/LICENSE)
1 -'use strict';
2 -
3 -var micromatch = require('micromatch');
4 -var normalize = require('normalize-path');
5 -var path = require('path'); // required for tests.
6 -var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); };
7 -
8 -var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) {
9 - criteria = arrify(criteria);
10 - value = arrify(value);
11 - if (arguments.length === 1) {
12 - return anymatch.bind(null, criteria.map(function(criterion) {
13 - return typeof criterion === 'string' && criterion[0] !== '!' ?
14 - micromatch.matcher(criterion) : criterion;
15 - }));
16 - }
17 - startIndex = startIndex || 0;
18 - var string = value[0];
19 - var altString, altValue;
20 - var matched = false;
21 - var matchIndex = -1;
22 - function testCriteria(criterion, index) {
23 - var result;
24 - switch (Object.prototype.toString.call(criterion)) {
25 - case '[object String]':
26 - result = string === criterion || altString && altString === criterion;
27 - result = result || micromatch.isMatch(string, criterion);
28 - break;
29 - case '[object RegExp]':
30 - result = criterion.test(string) || altString && criterion.test(altString);
31 - break;
32 - case '[object Function]':
33 - result = criterion.apply(null, value);
34 - result = result || altValue && criterion.apply(null, altValue);
35 - break;
36 - default:
37 - result = false;
38 - }
39 - if (result) {
40 - matchIndex = index + startIndex;
41 - }
42 - return result;
43 - }
44 - var crit = criteria;
45 - var negGlobs = crit.reduce(function(arr, criterion, index) {
46 - if (typeof criterion === 'string' && criterion[0] === '!') {
47 - if (crit === criteria) {
48 - // make a copy before modifying
49 - crit = crit.slice();
50 - }
51 - crit[index] = null;
52 - arr.push(criterion.substr(1));
53 - }
54 - return arr;
55 - }, []);
56 - if (!negGlobs.length || !micromatch.any(string, negGlobs)) {
57 - if (path.sep === '\\' && typeof string === 'string') {
58 - altString = normalize(string);
59 - altString = altString === string ? null : altString;
60 - if (altString) altValue = [altString].concat(value.slice(1));
61 - }
62 - matched = crit.slice(startIndex, endIndex).some(testCriteria);
63 - }
64 - return returnIndex === true ? matchIndex : matched;
65 -};
66 -
67 -module.exports = anymatch;
1 -{
2 - "_from": "anymatch@^1.3.0",
3 - "_id": "anymatch@1.3.2",
4 - "_inBundle": false,
5 - "_integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==",
6 - "_location": "/anymatch",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "anymatch@^1.3.0",
12 - "name": "anymatch",
13 - "escapedName": "anymatch",
14 - "rawSpec": "^1.3.0",
15 - "saveSpec": null,
16 - "fetchSpec": "^1.3.0"
17 - },
18 - "_requiredBy": [
19 - "/chokidar"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz",
22 - "_shasum": "553dcb8f91e3c889845dfdba34c77721b90b9d7a",
23 - "_spec": "anymatch@^1.3.0",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\chokidar",
25 - "author": {
26 - "name": "Elan Shanker",
27 - "url": "http://github.com/es128"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/es128/anymatch/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "micromatch": "^2.1.5",
35 - "normalize-path": "^2.0.0"
36 - },
37 - "deprecated": false,
38 - "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions",
39 - "devDependencies": {
40 - "coveralls": "^2.11.2",
41 - "istanbul": "^0.3.13",
42 - "mocha": "^2.2.4"
43 - },
44 - "files": [
45 - "index.js"
46 - ],
47 - "homepage": "https://github.com/es128/anymatch",
48 - "keywords": [
49 - "match",
50 - "any",
51 - "string",
52 - "file",
53 - "fs",
54 - "list",
55 - "glob",
56 - "regex",
57 - "regexp",
58 - "regular",
59 - "expression",
60 - "function"
61 - ],
62 - "license": "ISC",
63 - "name": "anymatch",
64 - "repository": {
65 - "type": "git",
66 - "url": "git+https://github.com/es128/anymatch.git"
67 - },
68 - "scripts": {
69 - "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
70 - },
71 - "version": "1.3.2"
72 -}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", 21 "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
22 "_shasum": "73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86", 22 "_shasum": "73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86",
23 "_spec": "argparse@^1.0.2", 23 "_spec": "argparse@^1.0.2",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\js-yaml", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\js-yaml",
25 "bugs": { 25 "bugs": {
26 "url": "https://github.com/nodeca/argparse/issues" 26 "url": "https://github.com/nodeca/argparse/issues"
27 }, 27 },
......
1 -The MIT License (MIT)
2 -
3 -Copyright (c) 2014-2015, Jon Schlinkert.
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
11 -
12 -The above copyright notice and this permission notice shall be included in
13 -all copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 -THE SOFTWARE.
1 -# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base)
2 -
3 -> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
4 -
5 -## Install
6 -
7 -Install with [npm](https://www.npmjs.com/)
8 -
9 -```sh
10 -$ npm i arr-diff --save
11 -```
12 -Install with [bower](http://bower.io/)
13 -
14 -```sh
15 -$ bower install arr-diff --save
16 -```
17 -
18 -## API
19 -
20 -### [diff](index.js#L33)
21 -
22 -Return the difference between the first array and additional arrays.
23 -
24 -**Params**
25 -
26 -* `a` **{Array}**
27 -* `b` **{Array}**
28 -* `returns` **{Array}**
29 -
30 -**Example**
31 -
32 -```js
33 -var diff = require('arr-diff');
34 -
35 -var a = ['a', 'b', 'c', 'd'];
36 -var b = ['b', 'c'];
37 -
38 -console.log(diff(a, b))
39 -//=> ['a', 'd']
40 -```
41 -
42 -## Related projects
43 -
44 -* [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)
45 -* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter)
46 -* [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://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection)
47 -
48 -## Running tests
49 -
50 -Install dev dependencies:
51 -
52 -```sh
53 -$ npm i -d && npm test
54 -```
55 -
56 -## Contributing
57 -
58 -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-diff/issues/new).
59 -
60 -## Author
61 -
62 -**Jon Schlinkert**
63 -
64 -+ [github/jonschlinkert](https://github.com/jonschlinkert)
65 -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
66 -
67 -## License
68 -
69 -Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)
70 -Released under the MIT license.
71 -
72 -***
73 -
74 -_This file was generated by [verb](https://github.com/verbose/verb) on Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._
1 -/*!
2 - * arr-diff <https://github.com/jonschlinkert/arr-diff>
3 - *
4 - * Copyright (c) 2014 Jon Schlinkert, contributors.
5 - * Licensed under the MIT License
6 - */
7 -
8 -'use strict';
9 -
10 -var flatten = require('arr-flatten');
11 -var slice = [].slice;
12 -
13 -/**
14 - * Return the difference between the first array and
15 - * additional arrays.
16 - *
17 - * ```js
18 - * var diff = require('{%= name %}');
19 - *
20 - * var a = ['a', 'b', 'c', 'd'];
21 - * var b = ['b', 'c'];
22 - *
23 - * console.log(diff(a, b))
24 - * //=> ['a', 'd']
25 - * ```
26 - *
27 - * @param {Array} `a`
28 - * @param {Array} `b`
29 - * @return {Array}
30 - * @api public
31 - */
32 -
33 -function diff(arr, arrays) {
34 - var argsLen = arguments.length;
35 - var len = arr.length, i = -1;
36 - var res = [], arrays;
37 -
38 - if (argsLen === 1) {
39 - return arr;
40 - }
41 -
42 - if (argsLen > 2) {
43 - arrays = flatten(slice.call(arguments, 1));
44 - }
45 -
46 - while (++i < len) {
47 - if (!~arrays.indexOf(arr[i])) {
48 - res.push(arr[i]);
49 - }
50 - }
51 - return res;
52 -}
53 -
54 -/**
55 - * Expose `diff`
56 - */
57 -
58 -module.exports = diff;
1 -{
2 - "_from": "arr-diff@^2.0.0",
3 - "_id": "arr-diff@2.0.0",
4 - "_inBundle": false,
5 - "_integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
6 - "_location": "/arr-diff",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "arr-diff@^2.0.0",
12 - "name": "arr-diff",
13 - "escapedName": "arr-diff",
14 - "rawSpec": "^2.0.0",
15 - "saveSpec": null,
16 - "fetchSpec": "^2.0.0"
17 - },
18 - "_requiredBy": [
19 - "/micromatch"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
22 - "_shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf",
23 - "_spec": "arr-diff@^2.0.0",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\micromatch",
25 - "author": {
26 - "name": "Jon Schlinkert",
27 - "url": "https://github.com/jonschlinkert"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/jonschlinkert/arr-diff/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "arr-flatten": "^1.0.1"
35 - },
36 - "deprecated": false,
37 - "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.",
38 - "devDependencies": {
39 - "array-differ": "^1.0.0",
40 - "array-slice": "^0.2.3",
41 - "benchmarked": "^0.1.4",
42 - "chalk": "^1.1.1",
43 - "mocha": "*",
44 - "should": "*"
45 - },
46 - "engines": {
47 - "node": ">=0.10.0"
48 - },
49 - "files": [
50 - "index.js"
51 - ],
52 - "homepage": "https://github.com/jonschlinkert/arr-diff",
53 - "keywords": [
54 - "arr",
55 - "array",
56 - "diff",
57 - "differ",
58 - "difference"
59 - ],
60 - "license": "MIT",
61 - "main": "index.js",
62 - "name": "arr-diff",
63 - "repository": {
64 - "type": "git",
65 - "url": "git+https://github.com/jonschlinkert/arr-diff.git"
66 - },
67 - "scripts": {
68 - "test": "mocha"
69 - },
70 - "verb": {
71 - "related": {
72 - "list": [
73 - "arr-flatten",
74 - "array-filter",
75 - "array-intersection"
76 - ]
77 - }
78 - },
79 - "version": "2.0.0"
80 -}
1 -The MIT License (MIT)
2 -
3 -Copyright (c) 2014-2017, Jon Schlinkert.
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
11 -
12 -The above copyright notice and this permission notice shall be included in
13 -all copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 -THE SOFTWARE.
1 -# 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)
2 -
3 -> Recursively flatten an array or arrays.
4 -
5 -## Install
6 -
7 -Install with [npm](https://www.npmjs.com/):
8 -
9 -```sh
10 -$ npm install --save arr-flatten
11 -```
12 -
13 -## Install
14 -
15 -Install with [bower](https://bower.io/)
16 -
17 -```sh
18 -$ bower install arr-flatten --save
19 -```
20 -
21 -## Usage
22 -
23 -```js
24 -var flatten = require('arr-flatten');
25 -
26 -flatten(['a', ['b', ['c']], 'd', ['e']]);
27 -//=> ['a', 'b', 'c', 'd', 'e']
28 -```
29 -
30 -## Why another flatten utility?
31 -
32 -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%.
33 -
34 -## About
35 -
36 -### Related projects
37 -
38 -* [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.")
39 -* [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.")
40 -* [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.")
41 -* [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.")
42 -
43 -### Contributing
44 -
45 -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
46 -
47 -### Contributors
48 -
49 -| **Commits** | **Contributor** |
50 -| --- | --- |
51 -| 20 | [jonschlinkert](https://github.com/jonschlinkert) |
52 -| 1 | [lukeed](https://github.com/lukeed) |
53 -
54 -### Building docs
55 -
56 -_(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.)_
57 -
58 -To generate the readme, run the following command:
59 -
60 -```sh
61 -$ npm install -g verbose/verb#dev verb-generate-readme && verb
62 -```
63 -
64 -### Running tests
65 -
66 -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:
67 -
68 -```sh
69 -$ npm install && npm test
70 -```
71 -
72 -### Author
73 -
74 -**Jon Schlinkert**
75 -
76 -* [github/jonschlinkert](https://github.com/jonschlinkert)
77 -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
78 -
79 -### License
80 -
81 -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
82 -Released under the [MIT License](LICENSE).
83 -
84 -***
85 -
86 -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._
...\ No newline at end of file ...\ No newline at end of file
1 -/*!
2 - * arr-flatten <https://github.com/jonschlinkert/arr-flatten>
3 - *
4 - * Copyright (c) 2014-2017, Jon Schlinkert.
5 - * Released under the MIT License.
6 - */
7 -
8 -'use strict';
9 -
10 -module.exports = function (arr) {
11 - return flat(arr, []);
12 -};
13 -
14 -function flat(arr, res) {
15 - var i = 0, cur;
16 - var len = arr.length;
17 - for (; i < len; i++) {
18 - cur = arr[i];
19 - Array.isArray(cur) ? flat(cur, res) : res.push(cur);
20 - }
21 - return res;
22 -}
1 -{
2 - "_from": "arr-flatten@^1.0.1",
3 - "_id": "arr-flatten@1.1.0",
4 - "_inBundle": false,
5 - "_integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
6 - "_location": "/arr-flatten",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "arr-flatten@^1.0.1",
12 - "name": "arr-flatten",
13 - "escapedName": "arr-flatten",
14 - "rawSpec": "^1.0.1",
15 - "saveSpec": null,
16 - "fetchSpec": "^1.0.1"
17 - },
18 - "_requiredBy": [
19 - "/arr-diff"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
22 - "_shasum": "36048bbff4e7b47e136644316c99669ea5ae91f1",
23 - "_spec": "arr-flatten@^1.0.1",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\arr-diff",
25 - "author": {
26 - "name": "Jon Schlinkert",
27 - "url": "https://github.com/jonschlinkert"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/jonschlinkert/arr-flatten/issues"
31 - },
32 - "bundleDependencies": false,
33 - "contributors": [
34 - {
35 - "name": "Jon Schlinkert",
36 - "url": "http://twitter.com/jonschlinkert"
37 - },
38 - {
39 - "name": "Luke Edwards",
40 - "url": "https://lukeed.com"
41 - }
42 - ],
43 - "deprecated": false,
44 - "description": "Recursively flatten an array or arrays.",
45 - "devDependencies": {
46 - "ansi-bold": "^0.1.1",
47 - "array-flatten": "^2.1.1",
48 - "array-slice": "^1.0.0",
49 - "benchmarked": "^1.0.0",
50 - "compute-flatten": "^1.0.0",
51 - "flatit": "^1.1.1",
52 - "flatten": "^1.0.2",
53 - "flatten-array": "^1.0.0",
54 - "glob": "^7.1.1",
55 - "gulp-format-md": "^0.1.12",
56 - "just-flatten-it": "^1.1.23",
57 - "lodash.flattendeep": "^4.4.0",
58 - "m_flattened": "^1.0.1",
59 - "mocha": "^3.2.0",
60 - "utils-flatten": "^1.0.0",
61 - "write": "^0.3.3"
62 - },
63 - "engines": {
64 - "node": ">=0.10.0"
65 - },
66 - "files": [
67 - "index.js"
68 - ],
69 - "homepage": "https://github.com/jonschlinkert/arr-flatten",
70 - "keywords": [
71 - "arr",
72 - "array",
73 - "elements",
74 - "flat",
75 - "flatten",
76 - "nested",
77 - "recurse",
78 - "recursive",
79 - "recursively"
80 - ],
81 - "license": "MIT",
82 - "main": "index.js",
83 - "name": "arr-flatten",
84 - "repository": {
85 - "type": "git",
86 - "url": "git+https://github.com/jonschlinkert/arr-flatten.git"
87 - },
88 - "scripts": {
89 - "test": "mocha"
90 - },
91 - "verb": {
92 - "toc": false,
93 - "layout": "default",
94 - "tasks": [
95 - "readme"
96 - ],
97 - "plugins": [
98 - "gulp-format-md"
99 - ],
100 - "related": {
101 - "list": [
102 - "arr-filter",
103 - "arr-union",
104 - "array-each",
105 - "array-unique"
106 - ]
107 - },
108 - "lint": {
109 - "reflinks": true
110 - }
111 - },
112 - "version": "1.1.0"
113 -}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", 21 "_resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
22 "_shasum": "df010aa1287e164bbda6f9723b0a96a1ec4187a1", 22 "_shasum": "df010aa1287e164bbda6f9723b0a96a1ec4187a1",
23 "_spec": "array-find-index@^1.0.1", 23 "_spec": "array-find-index@^1.0.1",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\currently-unhandled", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\currently-unhandled",
25 "author": { 25 "author": {
26 "name": "Sindre Sorhus", 26 "name": "Sindre Sorhus",
27 "email": "sindresorhus@gmail.com", 27 "email": "sindresorhus@gmail.com",
......
1 -The MIT License (MIT)
2 -
3 -Copyright (c) 2014-2015, Jon Schlinkert.
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
11 -
12 -The above copyright notice and this permission notice shall be included in
13 -all copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 -THE SOFTWARE.
1 -# array-unique [![NPM version](https://badge.fury.io/js/array-unique.svg)](http://badge.fury.io/js/array-unique) [![Build Status](https://travis-ci.org/jonschlinkert/array-unique.svg)](https://travis-ci.org/jonschlinkert/array-unique)
2 -
3 -> Return an array free of duplicate values. Fastest ES5 implementation.
4 -
5 -## Install with [npm](npmjs.org)
6 -
7 -```bash
8 -npm i array-unique --save
9 -```
10 -
11 -## Usage
12 -
13 -```js
14 -var unique = require('array-unique');
15 -
16 -unique(['a', 'b', 'c', 'c']);
17 -//=> ['a', 'b', 'c']
18 -```
19 -
20 -## Related
21 -* [arr-diff](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.
22 -* [arr-union](https://github.com/jonschlinkert/arr-union): Returns an array of unique values using strict equality for comparisons.
23 -* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
24 -* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements.
25 -* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map.
26 -* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection.
27 -
28 -## Run tests
29 -Install dev dependencies.
30 -
31 -```bash
32 -npm i -d && npm test
33 -```
34 -
35 -## Contributing
36 -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-unique/issues)
37 -
38 -## Author
39 -
40 -**Jon Schlinkert**
41 -
42 -+ [github/jonschlinkert](https://github.com/jonschlinkert)
43 -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
44 -
45 -## License
46 -Copyright (c) 2015 Jon Schlinkert
47 -Released under the MIT license
48 -
49 -***
50 -
51 -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 24, 2015._
...\ No newline at end of file ...\ No newline at end of file
1 -/*!
2 - * array-unique <https://github.com/jonschlinkert/array-unique>
3 - *
4 - * Copyright (c) 2014-2015, Jon Schlinkert.
5 - * Licensed under the MIT License.
6 - */
7 -
8 -'use strict';
9 -
10 -module.exports = function unique(arr) {
11 - if (!Array.isArray(arr)) {
12 - throw new TypeError('array-unique expects an array.');
13 - }
14 -
15 - var len = arr.length;
16 - var i = -1;
17 -
18 - while (i++ < len) {
19 - var j = i + 1;
20 -
21 - for (; j < arr.length; ++j) {
22 - if (arr[i] === arr[j]) {
23 - arr.splice(j--, 1);
24 - }
25 - }
26 - }
27 - return arr;
28 -};
1 -{
2 - "_from": "array-unique@^0.2.1",
3 - "_id": "array-unique@0.2.1",
4 - "_inBundle": false,
5 - "_integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
6 - "_location": "/array-unique",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "array-unique@^0.2.1",
12 - "name": "array-unique",
13 - "escapedName": "array-unique",
14 - "rawSpec": "^0.2.1",
15 - "saveSpec": null,
16 - "fetchSpec": "^0.2.1"
17 - },
18 - "_requiredBy": [
19 - "/micromatch"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
22 - "_shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53",
23 - "_spec": "array-unique@^0.2.1",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\micromatch",
25 - "author": {
26 - "name": "Jon Schlinkert",
27 - "url": "https://github.com/jonschlinkert"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/jonschlinkert/array-unique/issues"
31 - },
32 - "bundleDependencies": false,
33 - "deprecated": false,
34 - "description": "Return an array free of duplicate values. Fastest ES5 implementation.",
35 - "devDependencies": {
36 - "array-uniq": "^1.0.2",
37 - "benchmarked": "^0.1.3",
38 - "mocha": "*",
39 - "should": "*"
40 - },
41 - "engines": {
42 - "node": ">=0.10.0"
43 - },
44 - "files": [
45 - "index.js"
46 - ],
47 - "homepage": "https://github.com/jonschlinkert/array-unique",
48 - "license": {
49 - "type": "MIT",
50 - "url": "https://github.com/jonschlinkert/array-unique/blob/master/LICENSE"
51 - },
52 - "main": "index.js",
53 - "name": "array-unique",
54 - "repository": {
55 - "type": "git",
56 - "url": "git://github.com/jonschlinkert/array-unique.git"
57 - },
58 - "scripts": {
59 - "test": "mocha"
60 - },
61 - "version": "0.2.1"
62 -}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", 21 "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
22 "_shasum": "dac8787713c9966849fc8180777ebe9c1ddf3b86", 22 "_shasum": "dac8787713c9966849fc8180777ebe9c1ddf3b86",
23 "_spec": "asn1@~0.2.3", 23 "_spec": "asn1@~0.2.3",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\sshpk", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\sshpk",
25 "author": { 25 "author": {
26 "name": "Mark Cavage", 26 "name": "Mark Cavage",
27 "email": "mcavage@gmail.com" 27 "email": "mcavage@gmail.com"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
26 "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 26 "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
27 "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", 27 "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
28 "_spec": "assert-plus@^1.0.0", 28 "_spec": "assert-plus@^1.0.0",
29 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\http-signature", 29 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\http-signature",
30 "author": { 30 "author": {
31 "name": "Mark Cavage", 31 "name": "Mark Cavage",
32 "email": "mcavage@gmail.com" 32 "email": "mcavage@gmail.com"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 "_resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", 21 "_resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz",
22 "_shasum": "13ca515d86206da0bac66e834dd397d87581094c", 22 "_shasum": "13ca515d86206da0bac66e834dd397d87581094c",
23 "_spec": "assertion-error@^1.0.1", 23 "_spec": "assertion-error@^1.0.1",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\chai", 24 + "_where": "D:\\w\\project\\comnetprj\\node_modules\\chai",
25 "author": { 25 "author": {
26 "name": "Jake Luer", 26 "name": "Jake Luer",
27 "email": "jake@qualiancy.com", 27 "email": "jake@qualiancy.com",
......
1 -Copyright (c) 2013 Olov Lassus <olov.lassus@gmail.com>
2 -
3 -Permission is hereby granted, free of charge, to any person obtaining a copy
4 -of this software and associated documentation files (the "Software"), to deal
5 -in the Software without restriction, including without limitation the rights
6 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 -copies of the Software, and to permit persons to whom the Software is
8 -furnished to do so, subject to the following conditions:
9 -
10 -The above copyright notice and this permission notice shall be included in
11 -all copies or substantial portions of the Software.
12 -
13 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 -THE SOFTWARE.
1 -# ast-traverse.js
2 -Simple but flexible AST traversal with pre and post visitors.
3 -Works in node and browsers.
4 -
5 -
6 -
7 -## Usage
8 -```javascript
9 -// ast is a Mozilla Parser API compatible structure
10 -// generated by Esprima or another parser
11 -var ast = require("esprima").parse("f(1, x) + 2");
12 -
13 -var traverse = require("ast-traverse");
14 -
15 -// print AST node types, pre-order (node first, then its children)
16 -traverse(ast, {pre: function(node, parent, prop, idx) {
17 - console.log(node.type + (parent ? " from parent " + parent.type +
18 - " via " + prop + (idx !== undefined ? "[" + idx + "]" : "") : ""));
19 -}});
20 -console.log();
21 -/*
22 - =>
23 - Program
24 - ExpressionStatement from parent Program via body[0]
25 - BinaryExpression from parent ExpressionStatement via expression
26 - CallExpression from parent BinaryExpression via left
27 - Identifier from parent CallExpression via callee
28 - Literal from parent CallExpression via arguments[0]
29 - Identifier from parent CallExpression via arguments[1]
30 - Literal from parent BinaryExpression via right
31 - */
32 -
33 -
34 -// you can also visit post-order, or both
35 -// all four arguments are provided to both visitors (left out unused below)
36 -var indent = 0;
37 -traverse(ast, {
38 - pre: function(node) {
39 - console.log(Array(indent + 1).join(" ") + node.type);
40 - indent += 4;
41 - },
42 - post: function() {
43 - indent -= 4;
44 - }
45 -});
46 -console.log();
47 -/*
48 -=>
49 - Program
50 - ExpressionStatement
51 - BinaryExpression
52 - CallExpression
53 - Identifier
54 - Literal
55 - Identifier
56 - Literal
57 -*/
58 -
59 -
60 -// return false from the pre-visitor to skip traversing its children
61 -// throw an exception to abort traversal
62 -
63 -
64 -// by default node property names beginning with $ are skipped
65 -// but you can supply your own skipProperty function instead
66 -traverse(ast, {
67 - pre: function(node) {
68 - console.log(node.type);
69 - },
70 - skipProperty: function(prop, node) {
71 - return prop === "parent" || prop === "expression";
72 - }
73 -});
74 -/*
75 -=>
76 - Program
77 - ExpressionStatement
78 -*/
79 -```
80 -
81 -
82 -
83 -## Installation
84 -
85 -### Node
86 -Install using npm
87 -
88 - npm install ast-traverse
89 -
90 -```javascript
91 -var traverse = require("ast-traverse");
92 -```
93 -
94 -### Browser
95 -Clone the repo and include it in a script tag
96 -
97 - git clone https://github.com/olov/ast-traverse.git
98 -
99 -```html
100 -<script src="ast-traverse/ast-traverse.js"></script>
101 -```
1 -function traverse(root, options) {
2 - "use strict";
3 -
4 - options = options || {};
5 - var pre = options.pre;
6 - var post = options.post;
7 - var skipProperty = options.skipProperty;
8 -
9 - function visit(node, parent, prop, idx) {
10 - if (!node || typeof node.type !== "string") {
11 - return;
12 - }
13 -
14 - var res = undefined;
15 - if (pre) {
16 - res = pre(node, parent, prop, idx);
17 - }
18 -
19 - if (res !== false) {
20 - for (var prop in node) {
21 - if (skipProperty ? skipProperty(prop, node) : prop[0] === "$") {
22 - continue;
23 - }
24 -
25 - var child = node[prop];
26 -
27 - if (Array.isArray(child)) {
28 - for (var i = 0; i < child.length; i++) {
29 - visit(child[i], node, prop, i);
30 - }
31 - } else {
32 - visit(child, node, prop);
33 - }
34 - }
35 - }
36 -
37 - if (post) {
38 - post(node, parent, prop, idx);
39 - }
40 - }
41 -
42 - visit(root, null);
43 -};
44 -
45 -if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
46 - module.exports = traverse;
47 -}
1 -{
2 - "_from": "ast-traverse@~0.1.1",
3 - "_id": "ast-traverse@0.1.1",
4 - "_inBundle": false,
5 - "_integrity": "sha1-ac8rg4bxnc2hux4F1o/jWdiJfeY=",
6 - "_location": "/ast-traverse",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "ast-traverse@~0.1.1",
12 - "name": "ast-traverse",
13 - "escapedName": "ast-traverse",
14 - "rawSpec": "~0.1.1",
15 - "saveSpec": null,
16 - "fetchSpec": "~0.1.1"
17 - },
18 - "_requiredBy": [
19 - "/defs"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz",
22 - "_shasum": "69cf2b8386f19dcda1bb1e05d68fe359d8897de6",
23 - "_spec": "ast-traverse@~0.1.1",
24 - "_where": "C:\\Users\\User\\desktop\\HJW\\meadowlark\\site\\node_modules\\defs",
25 - "author": {
26 - "name": "Olov Lassus",
27 - "email": "olov.lassus@gmail.com"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/olov/ast-traverse/issues"
31 - },
32 - "bundleDependencies": false,
33 - "deprecated": false,
34 - "description": "simple but flexible AST traversal with pre and post visitors",
35 - "homepage": "https://github.com/olov/ast-traverse#readme",
36 - "keywords": [
37 - "ast",
38 - "traverse",
39 - "traversal",
40 - "walk",
41 - "visit",
42 - "visitor",
43 - "esprima"
44 - ],
45 - "license": "MIT",
46 - "main": "ast-traverse.js",
47 - "name": "ast-traverse",
48 - "repository": {
49 - "type": "git",
50 - "url": "git+https://github.com/olov/ast-traverse.git"
51 - },
52 - "version": "0.1.1"
53 -}
1 -{
2 - "type": "Program",
3 - "body": [
4 - {
5 - "type": "ExpressionStatement",
6 - "expression": {
7 - "type": "BinaryExpression",
8 - "operator": "+",
9 - "left": {
10 - "type": "CallExpression",
11 - "callee": {
12 - "type": "Identifier",
13 - "name": "f"
14 - },
15 - "arguments": [
16 - {
17 - "type": "Literal",
18 - "value": 1
19 - },
20 - {
21 - "type": "Identifier",
22 - "name": "x"
23 - }
24 - ]
25 - },
26 - "right": {
27 - "type": "Literal",
28 - "value": 2
29 - }
30 - }
31 - }
32 - ]
33 -}
1 -// ast is a Mozilla Parser API compatible structure
2 -// generated by Esprima or another parser
3 -var ast = require("./tst-ast.json");
4 -// or: var ast = require("esprima").parse("f(1, x) + 2");
5 -
6 -var traverse = require("../ast-traverse");
7 -
8 -// print AST node types, pre-order (node first, then its children)
9 -traverse(ast, {pre: function(node, parent, prop, idx) {
10 - console.log(node.type + (parent ? " from parent " + parent.type +
11 - " via " + prop + (idx !== undefined ? "[" + idx + "]" : "") : ""));
12 -}});
13 -console.log();
14 -/*
15 - =>
16 - Program
17 - ExpressionStatement from parent Program via body[0]
18 - BinaryExpression from parent ExpressionStatement via expression
19 - CallExpression from parent BinaryExpression via left
20 - Identifier from parent CallExpression via callee
21 - Literal from parent CallExpression via arguments[0]
22 - Identifier from parent CallExpression via arguments[1]
23 - Literal from parent BinaryExpression via right
24 - */
25 -
26 -
27 -// you can also visit post-order, or both
28 -// all four arguments are provided to both visitors (left out unused below)
29 -var indent = 0;
30 -traverse(ast, {
31 - pre: function(node) {
32 - console.log(Array(indent + 1).join(" ") + node.type);
33 - indent += 4;
34 - },
35 - post: function() {
36 - indent -= 4;
37 - }
38 -});
39 -console.log();
40 -/*
41 -=>
42 - Program
43 - ExpressionStatement
44 - BinaryExpression
45 - CallExpression
46 - Identifier
47 - Literal
48 - Identifier
49 - Literal
50 -*/
51 -
52 -
53 -// return false from the pre-visitor to skip traversing its children
54 -// throw an exception to abort traversal
55 -
56 -
57 -// by default node property names beginning with $ are skipped
58 -// but you can supply your own skipProperty function instead
59 -traverse(ast, {
60 - pre: function(node) {
61 - console.log(node.type);
62 - },
63 - skipProperty: function(prop, node) {
64 - return prop === "parent" || prop === "expression";
65 - }
66 -});
67 -/*
68 -=>
69 - Program
70 - ExpressionStatement
71 -*/
1 -language: node_js
2 -node_js:
3 - - "6.0"
4 - - "5.0"
5 - - "4.0"
6 - - "iojs"
7 - - "0.12"
8 - - "0.11"
9 - - "0.10"
10 - - "0.8"
11 - - "0.6"
12 -
13 -sudo: false
14 -
15 -before_install:
16 - npm install -g npm@'>=1.4.3'
17 -
18 -matrix:
19 - allow_failures:
20 - - node_js: "0.8"
21 - - node_js: "0.6"
1 -Copyright (c) 2013 Ben Newman <bn@cs.stanford.edu>
2 -
3 -Permission is hereby granted, free of charge, to any person obtaining
4 -a copy of this software and associated documentation files (the
5 -"Software"), to deal in the Software without restriction, including
6 -without limitation the rights to use, copy, modify, merge, publish,
7 -distribute, sublicense, and/or sell copies of the Software, and to
8 -permit persons to whom the Software is furnished to do so, subject to
9 -the following conditions:
10 -
11 -The above copyright notice and this permission notice shall be
12 -included in all copies or substantial portions of the Software.
13 -
14 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This diff is collapsed. Click to expand it.
1 -module.exports = function (fork) {
2 - fork.use(require("./es7"));
3 -
4 - var types = fork.use(require("../lib/types"));
5 - var defaults = fork.use(require("../lib/shared")).defaults;
6 - var def = types.Type.def;
7 - var or = types.Type.or;
8 -
9 - def("Noop")
10 - .bases("Node")
11 - .build();
12 -
13 - def("DoExpression")
14 - .bases("Expression")
15 - .build("body")
16 - .field("body", [def("Statement")]);
17 -
18 - def("Super")
19 - .bases("Expression")
20 - .build();
21 -
22 - def("BindExpression")
23 - .bases("Expression")
24 - .build("object", "callee")
25 - .field("object", or(def("Expression"), null))
26 - .field("callee", def("Expression"));
27 -
28 - def("Decorator")
29 - .bases("Node")
30 - .build("expression")
31 - .field("expression", def("Expression"));
32 -
33 - def("Property")
34 - .field("decorators",
35 - or([def("Decorator")], null),
36 - defaults["null"]);
37 -
38 - def("MethodDefinition")
39 - .field("decorators",
40 - or([def("Decorator")], null),
41 - defaults["null"]);
42 -
43 - def("MetaProperty")
44 - .bases("Expression")
45 - .build("meta", "property")
46 - .field("meta", def("Identifier"))
47 - .field("property", def("Identifier"));
48 -
49 - def("ParenthesizedExpression")
50 - .bases("Expression")
51 - .build("expression")
52 - .field("expression", def("Expression"));
53 -
54 - def("ImportSpecifier")
55 - .bases("ModuleSpecifier")
56 - .build("imported", "local")
57 - .field("imported", def("Identifier"));
58 -
59 - def("ImportDefaultSpecifier")
60 - .bases("ModuleSpecifier")
61 - .build("local");
62 -
63 - def("ImportNamespaceSpecifier")
64 - .bases("ModuleSpecifier")
65 - .build("local");
66 -
67 - def("ExportDefaultDeclaration")
68 - .bases("Declaration")
69 - .build("declaration")
70 - .field("declaration", or(def("Declaration"), def("Expression")));
71 -
72 - def("ExportNamedDeclaration")
73 - .bases("Declaration")
74 - .build("declaration", "specifiers", "source")
75 - .field("declaration", or(def("Declaration"), null))
76 - .field("specifiers", [def("ExportSpecifier")], defaults.emptyArray)
77 - .field("source", or(def("Literal"), null), defaults["null"]);
78 -
79 - def("ExportSpecifier")
80 - .bases("ModuleSpecifier")
81 - .build("local", "exported")
82 - .field("exported", def("Identifier"));
83 -
84 - def("ExportNamespaceSpecifier")
85 - .bases("Specifier")
86 - .build("exported")
87 - .field("exported", def("Identifier"));
88 -
89 - def("ExportDefaultSpecifier")
90 - .bases("Specifier")
91 - .build("exported")
92 - .field("exported", def("Identifier"));
93 -
94 - def("ExportAllDeclaration")
95 - .bases("Declaration")
96 - .build("exported", "source")
97 - .field("exported", or(def("Identifier"), null))
98 - .field("source", def("Literal"));
99 -
100 - def("CommentBlock")
101 - .bases("Comment")
102 - .build("value", /*optional:*/ "leading", "trailing");
103 -
104 - def("CommentLine")
105 - .bases("Comment")
106 - .build("value", /*optional:*/ "leading", "trailing");
107 -};
...\ No newline at end of file ...\ No newline at end of file
1 -module.exports = function (fork) {
2 - fork.use(require("./babel"));
3 - fork.use(require("./flow"));
4 -
5 - // var types = fork.types;
6 - var types = fork.use(require("../lib/types"));
7 - // var defaults = fork.shared.defaults;
8 - var defaults = fork.use(require("../lib/shared")).defaults;
9 - var def = types.Type.def;
10 - var or = types.Type.or;
11 -
12 - def("Directive")
13 - .bases("Node")
14 - .build("value")
15 - .field("value", def("DirectiveLiteral"));
16 -
17 - def("DirectiveLiteral")
18 - .bases("Node", "Expression")
19 - .build("value")
20 - .field("value", String, defaults["use strict"]);
21 -
22 - def("BlockStatement")
23 - .bases("Statement")
24 - .build("body")
25 - .field("body", [def("Statement")])
26 - .field("directives", [def("Directive")], defaults.emptyArray);
27 -
28 - def("Program")
29 - .bases("Node")
30 - .build("body")
31 - .field("body", [def("Statement")])
32 - .field("directives", [def("Directive")], defaults.emptyArray);
33 -
34 - // Split Literal
35 - def("StringLiteral")
36 - .bases("Literal")
37 - .build("value")
38 - .field("value", String);
39 -
40 - def("NumericLiteral")
41 - .bases("Literal")
42 - .build("value")
43 - .field("value", Number);
44 -
45 - def("NullLiteral")
46 - .bases("Literal")
47 - .build();
48 -
49 - def("BooleanLiteral")
50 - .bases("Literal")
51 - .build("value")
52 - .field("value", Boolean);
53 -
54 - def("RegExpLiteral")
55 - .bases("Literal")
56 - .build("pattern", "flags")
57 - .field("pattern", String)
58 - .field("flags", String);
59 -
60 - var ObjectExpressionProperty = or(
61 - def("Property"),
62 - def("ObjectMethod"),
63 - def("ObjectProperty"),
64 - def("SpreadProperty")
65 - );
66 -
67 - // Split Property -> ObjectProperty and ObjectMethod
68 - def("ObjectExpression")
69 - .bases("Expression")
70 - .build("properties")
71 - .field("properties", [ObjectExpressionProperty]);
72 -
73 - // ObjectMethod hoist .value properties to own properties
74 - def("ObjectMethod")
75 - .bases("Node", "Function")
76 - .build("kind", "key", "params", "body", "computed")
77 - .field("kind", or("method", "get", "set"))
78 - .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
79 - .field("params", [def("Pattern")])
80 - .field("body", def("BlockStatement"))
81 - .field("computed", Boolean, defaults["false"])
82 - .field("generator", Boolean, defaults["false"])
83 - .field("async", Boolean, defaults["false"])
84 - .field("decorators",
85 - or([def("Decorator")], null),
86 - defaults["null"]);
87 -
88 - def("ObjectProperty")
89 - .bases("Node")
90 - .build("key", "value")
91 - .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
92 - .field("value", or(def("Expression"), def("Pattern")))
93 - .field("computed", Boolean, defaults["false"]);
94 -
95 - var ClassBodyElement = or(
96 - def("MethodDefinition"),
97 - def("VariableDeclarator"),
98 - def("ClassPropertyDefinition"),
99 - def("ClassProperty"),
100 - def("ClassMethod")
101 - );
102 -
103 - // MethodDefinition -> ClassMethod
104 - def("ClassBody")
105 - .bases("Declaration")
106 - .build("body")
107 - .field("body", [ClassBodyElement]);
108 -
109 - def("ClassMethod")
110 - .bases("Declaration", "Function")
111 - .build("kind", "key", "params", "body", "computed", "static")
112 - .field("kind", or("get", "set", "method", "constructor"))
113 - .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
114 - .field("params", [def("Pattern")])
115 - .field("body", def("BlockStatement"))
116 - .field("computed", Boolean, defaults["false"])
117 - .field("static", Boolean, defaults["false"])
118 - .field("generator", Boolean, defaults["false"])
119 - .field("async", Boolean, defaults["false"])
120 - .field("decorators",
121 - or([def("Decorator")], null),
122 - defaults["null"]);
123 -
124 - var ObjectPatternProperty = or(
125 - def("Property"),
126 - def("PropertyPattern"),
127 - def("SpreadPropertyPattern"),
128 - def("SpreadProperty"), // Used by Esprima
129 - def("ObjectProperty"), // Babel 6
130 - def("RestProperty") // Babel 6
131 - );
132 -
133 - // Split into RestProperty and SpreadProperty
134 - def("ObjectPattern")
135 - .bases("Pattern")
136 - .build("properties")
137 - .field("properties", [ObjectPatternProperty])
138 - .field("decorators",
139 - or([def("Decorator")], null),
140 - defaults["null"]);
141 -
142 - def("SpreadProperty")
143 - .bases("Node")
144 - .build("argument")
145 - .field("argument", def("Expression"));
146 -
147 - def("RestProperty")
148 - .bases("Node")
149 - .build("argument")
150 - .field("argument", def("Expression"));
151 -
152 - def("ForAwaitStatement")
153 - .bases("Statement")
154 - .build("left", "right", "body")
155 - .field("left", or(
156 - def("VariableDeclaration"),
157 - def("Expression")))
158 - .field("right", def("Expression"))
159 - .field("body", def("Statement"));
160 -
161 - // The callee node of a dynamic import(...) expression.
162 - def("Import")
163 - .bases("Expression")
164 - .build();
165 -};
This diff is collapsed. Click to expand it.
1 -module.exports = function (fork) {
2 - fork.use(require("./core"));
3 - var types = fork.use(require("../lib/types"));
4 - var def = types.Type.def;
5 - var or = types.Type.or;
6 -
7 - // Note that none of these types are buildable because the Mozilla Parser
8 - // API doesn't specify any builder functions, and nobody uses E4X anymore.
9 -
10 - def("XMLDefaultDeclaration")
11 - .bases("Declaration")
12 - .field("namespace", def("Expression"));
13 -
14 - def("XMLAnyName").bases("Expression");
15 -
16 - def("XMLQualifiedIdentifier")
17 - .bases("Expression")
18 - .field("left", or(def("Identifier"), def("XMLAnyName")))
19 - .field("right", or(def("Identifier"), def("Expression")))
20 - .field("computed", Boolean);
21 -
22 - def("XMLFunctionQualifiedIdentifier")
23 - .bases("Expression")
24 - .field("right", or(def("Identifier"), def("Expression")))
25 - .field("computed", Boolean);
26 -
27 - def("XMLAttributeSelector")
28 - .bases("Expression")
29 - .field("attribute", def("Expression"));
30 -
31 - def("XMLFilterExpression")
32 - .bases("Expression")
33 - .field("left", def("Expression"))
34 - .field("right", def("Expression"));
35 -
36 - def("XMLElement")
37 - .bases("XML", "Expression")
38 - .field("contents", [def("XML")]);
39 -
40 - def("XMLList")
41 - .bases("XML", "Expression")
42 - .field("contents", [def("XML")]);
43 -
44 - def("XML").bases("Node");
45 -
46 - def("XMLEscape")
47 - .bases("XML")
48 - .field("expression", def("Expression"));
49 -
50 - def("XMLText")
51 - .bases("XML")
52 - .field("text", String);
53 -
54 - def("XMLStartTag")
55 - .bases("XML")
56 - .field("contents", [def("XML")]);
57 -
58 - def("XMLEndTag")
59 - .bases("XML")
60 - .field("contents", [def("XML")]);
61 -
62 - def("XMLPointTag")
63 - .bases("XML")
64 - .field("contents", [def("XML")]);
65 -
66 - def("XMLName")
67 - .bases("XML")
68 - .field("contents", or(String, [def("XML")]));
69 -
70 - def("XMLAttribute")
71 - .bases("XML")
72 - .field("value", String);
73 -
74 - def("XMLCdata")
75 - .bases("XML")
76 - .field("contents", String);
77 -
78 - def("XMLComment")
79 - .bases("XML")
80 - .field("contents", String);
81 -
82 - def("XMLProcessingInstruction")
83 - .bases("XML")
84 - .field("target", String)
85 - .field("contents", or(String, null));
86 -};
...\ No newline at end of file ...\ No newline at end of file
1 -module.exports = function (fork) {
2 - fork.use(require("./core"));
3 - var types = fork.use(require("../lib/types"));
4 - var def = types.Type.def;
5 - var or = types.Type.or;
6 - var defaults = fork.use(require("../lib/shared")).defaults;
7 -
8 - def("Function")
9 - .field("generator", Boolean, defaults["false"])
10 - .field("expression", Boolean, defaults["false"])
11 - .field("defaults", [or(def("Expression"), null)], defaults.emptyArray)
12 - // TODO This could be represented as a RestElement in .params.
13 - .field("rest", or(def("Identifier"), null), defaults["null"]);
14 -
15 - // The ESTree way of representing a ...rest parameter.
16 - def("RestElement")
17 - .bases("Pattern")
18 - .build("argument")
19 - .field("argument", def("Pattern"));
20 -
21 - def("SpreadElementPattern")
22 - .bases("Pattern")
23 - .build("argument")
24 - .field("argument", def("Pattern"));
25 -
26 - def("FunctionDeclaration")
27 - .build("id", "params", "body", "generator", "expression");
28 -
29 - def("FunctionExpression")
30 - .build("id", "params", "body", "generator", "expression");
31 -
32 - // The Parser API calls this ArrowExpression, but Esprima and all other
33 - // actual parsers use ArrowFunctionExpression.
34 - def("ArrowFunctionExpression")
35 - .bases("Function", "Expression")
36 - .build("params", "body", "expression")
37 - // The forced null value here is compatible with the overridden
38 - // definition of the "id" field in the Function interface.
39 - .field("id", null, defaults["null"])
40 - // Arrow function bodies are allowed to be expressions.
41 - .field("body", or(def("BlockStatement"), def("Expression")))
42 - // The current spec forbids arrow generators, so I have taken the
43 - // liberty of enforcing that. TODO Report this.
44 - .field("generator", false, defaults["false"]);
45 -
46 - def("YieldExpression")
47 - .bases("Expression")
48 - .build("argument", "delegate")
49 - .field("argument", or(def("Expression"), null))
50 - .field("delegate", Boolean, defaults["false"]);
51 -
52 - def("GeneratorExpression")
53 - .bases("Expression")
54 - .build("body", "blocks", "filter")
55 - .field("body", def("Expression"))
56 - .field("blocks", [def("ComprehensionBlock")])
57 - .field("filter", or(def("Expression"), null));
58 -
59 - def("ComprehensionExpression")
60 - .bases("Expression")
61 - .build("body", "blocks", "filter")
62 - .field("body", def("Expression"))
63 - .field("blocks", [def("ComprehensionBlock")])
64 - .field("filter", or(def("Expression"), null));
65 -
66 - def("ComprehensionBlock")
67 - .bases("Node")
68 - .build("left", "right", "each")
69 - .field("left", def("Pattern"))
70 - .field("right", def("Expression"))
71 - .field("each", Boolean);
72 -
73 - def("Property")
74 - .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
75 - .field("value", or(def("Expression"), def("Pattern")))
76 - .field("method", Boolean, defaults["false"])
77 - .field("shorthand", Boolean, defaults["false"])
78 - .field("computed", Boolean, defaults["false"]);
79 -
80 - def("PropertyPattern")
81 - .bases("Pattern")
82 - .build("key", "pattern")
83 - .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
84 - .field("pattern", def("Pattern"))
85 - .field("computed", Boolean, defaults["false"]);
86 -
87 - def("ObjectPattern")
88 - .bases("Pattern")
89 - .build("properties")
90 - .field("properties", [or(def("PropertyPattern"), def("Property"))]);
91 -
92 - def("ArrayPattern")
93 - .bases("Pattern")
94 - .build("elements")
95 - .field("elements", [or(def("Pattern"), null)]);
96 -
97 - def("MethodDefinition")
98 - .bases("Declaration")
99 - .build("kind", "key", "value", "static")
100 - .field("kind", or("constructor", "method", "get", "set"))
101 - .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
102 - .field("value", def("Function"))
103 - .field("computed", Boolean, defaults["false"])
104 - .field("static", Boolean, defaults["false"]);
105 -
106 - def("SpreadElement")
107 - .bases("Node")
108 - .build("argument")
109 - .field("argument", def("Expression"));
110 -
111 - def("ArrayExpression")
112 - .field("elements", [or(
113 - def("Expression"),
114 - def("SpreadElement"),
115 - def("RestElement"),
116 - null
117 - )]);
118 -
119 - def("NewExpression")
120 - .field("arguments", [or(def("Expression"), def("SpreadElement"))]);
121 -
122 - def("CallExpression")
123 - .field("arguments", [or(def("Expression"), def("SpreadElement"))]);
124 -
125 - // Note: this node type is *not* an AssignmentExpression with a Pattern on
126 - // the left-hand side! The existing AssignmentExpression type already
127 - // supports destructuring assignments. AssignmentPattern nodes may appear
128 - // wherever a Pattern is allowed, and the right-hand side represents a
129 - // default value to be destructured against the left-hand side, if no
130 - // value is otherwise provided. For example: default parameter values.
131 - def("AssignmentPattern")
132 - .bases("Pattern")
133 - .build("left", "right")
134 - .field("left", def("Pattern"))
135 - .field("right", def("Expression"));
136 -
137 - var ClassBodyElement = or(
138 - def("MethodDefinition"),
139 - def("VariableDeclarator"),
140 - def("ClassPropertyDefinition"),
141 - def("ClassProperty")
142 - );
143 -
144 - def("ClassProperty")
145 - .bases("Declaration")
146 - .build("key")
147 - .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
148 - .field("computed", Boolean, defaults["false"]);
149 -
150 - def("ClassPropertyDefinition") // static property
151 - .bases("Declaration")
152 - .build("definition")
153 - // Yes, Virginia, circular definitions are permitted.
154 - .field("definition", ClassBodyElement);
155 -
156 - def("ClassBody")
157 - .bases("Declaration")
158 - .build("body")
159 - .field("body", [ClassBodyElement]);
160 -
161 - def("ClassDeclaration")
162 - .bases("Declaration")
163 - .build("id", "body", "superClass")
164 - .field("id", or(def("Identifier"), null))
165 - .field("body", def("ClassBody"))
166 - .field("superClass", or(def("Expression"), null), defaults["null"]);
167 -
168 - def("ClassExpression")
169 - .bases("Expression")
170 - .build("id", "body", "superClass")
171 - .field("id", or(def("Identifier"), null), defaults["null"])
172 - .field("body", def("ClassBody"))
173 - .field("superClass", or(def("Expression"), null), defaults["null"])
174 - .field("implements", [def("ClassImplements")], defaults.emptyArray);
175 -
176 - def("ClassImplements")
177 - .bases("Node")
178 - .build("id")
179 - .field("id", def("Identifier"))
180 - .field("superClass", or(def("Expression"), null), defaults["null"]);
181 -
182 - // Specifier and ModuleSpecifier are abstract non-standard types
183 - // introduced for definitional convenience.
184 - def("Specifier").bases("Node");
185 -
186 - // This supertype is shared/abused by both def/babel.js and
187 - // def/esprima.js. In the future, it will be possible to load only one set
188 - // of definitions appropriate for a given parser, but until then we must
189 - // rely on default functions to reconcile the conflicting AST formats.
190 - def("ModuleSpecifier")
191 - .bases("Specifier")
192 - // This local field is used by Babel/Acorn. It should not technically
193 - // be optional in the Babel/Acorn AST format, but it must be optional
194 - // in the Esprima AST format.
195 - .field("local", or(def("Identifier"), null), defaults["null"])
196 - // The id and name fields are used by Esprima. The id field should not
197 - // technically be optional in the Esprima AST format, but it must be
198 - // optional in the Babel/Acorn AST format.
199 - .field("id", or(def("Identifier"), null), defaults["null"])
200 - .field("name", or(def("Identifier"), null), defaults["null"]);
201 -
202 - def("TaggedTemplateExpression")
203 - .bases("Expression")
204 - .build("tag", "quasi")
205 - .field("tag", def("Expression"))
206 - .field("quasi", def("TemplateLiteral"));
207 -
208 - def("TemplateLiteral")
209 - .bases("Expression")
210 - .build("quasis", "expressions")
211 - .field("quasis", [def("TemplateElement")])
212 - .field("expressions", [def("Expression")]);
213 -
214 - def("TemplateElement")
215 - .bases("Node")
216 - .build("value", "tail")
217 - .field("value", {"cooked": String, "raw": String})
218 - .field("tail", Boolean);
219 -};
1 -module.exports = function (fork) {
2 - fork.use(require('./es6'));
3 -
4 - var types = fork.use(require("../lib/types"));
5 - var def = types.Type.def;
6 - var or = types.Type.or;
7 - var builtin = types.builtInTypes;
8 - var defaults = fork.use(require("../lib/shared")).defaults;
9 -
10 - def("Function")
11 - .field("async", Boolean, defaults["false"]);
12 -
13 - def("SpreadProperty")
14 - .bases("Node")
15 - .build("argument")
16 - .field("argument", def("Expression"));
17 -
18 - def("ObjectExpression")
19 - .field("properties", [or(def("Property"), def("SpreadProperty"))]);
20 -
21 - def("SpreadPropertyPattern")
22 - .bases("Pattern")
23 - .build("argument")
24 - .field("argument", def("Pattern"));
25 -
26 - def("ObjectPattern")
27 - .field("properties", [or(
28 - def("Property"),
29 - def("PropertyPattern"),
30 - def("SpreadPropertyPattern")
31 - )]);
32 -
33 - def("AwaitExpression")
34 - .bases("Expression")
35 - .build("argument", "all")
36 - .field("argument", or(def("Expression"), null))
37 - .field("all", Boolean, defaults["false"]);
38 -};
...\ No newline at end of file ...\ No newline at end of file
1 -module.exports = function (fork) {
2 - fork.use(require("./es7"));
3 -
4 - var types = fork.use(require("../lib/types"));
5 - var defaults = fork.use(require("../lib/shared")).defaults;
6 - var def = types.Type.def;
7 - var or = types.Type.or;
8 -
9 - def("VariableDeclaration")
10 - .field("declarations", [or(
11 - def("VariableDeclarator"),
12 - def("Identifier") // Esprima deviation.
13 - )]);
14 -
15 - def("Property")
16 - .field("value", or(
17 - def("Expression"),
18 - def("Pattern") // Esprima deviation.
19 - ));
20 -
21 - def("ArrayPattern")
22 - .field("elements", [or(
23 - def("Pattern"),
24 - def("SpreadElement"),
25 - null
26 - )]);
27 -
28 - def("ObjectPattern")
29 - .field("properties", [or(
30 - def("Property"),
31 - def("PropertyPattern"),
32 - def("SpreadPropertyPattern"),
33 - def("SpreadProperty") // Used by Esprima.
34 - )]);
35 -
36 -// Like ModuleSpecifier, except type:"ExportSpecifier" and buildable.
37 -// export {<id [as name]>} [from ...];
38 - def("ExportSpecifier")
39 - .bases("ModuleSpecifier")
40 - .build("id", "name");
41 -
42 -// export <*> from ...;
43 - def("ExportBatchSpecifier")
44 - .bases("Specifier")
45 - .build();
46 -
47 -// Like ModuleSpecifier, except type:"ImportSpecifier" and buildable.
48 -// import {<id [as name]>} from ...;
49 - def("ImportSpecifier")
50 - .bases("ModuleSpecifier")
51 - .build("id", "name");
52 -
53 -// import <* as id> from ...;
54 - def("ImportNamespaceSpecifier")
55 - .bases("ModuleSpecifier")
56 - .build("id");
57 -
58 -// import <id> from ...;
59 - def("ImportDefaultSpecifier")
60 - .bases("ModuleSpecifier")
61 - .build("id");
62 -
63 - def("ExportDeclaration")
64 - .bases("Declaration")
65 - .build("default", "declaration", "specifiers", "source")
66 - .field("default", Boolean)
67 - .field("declaration", or(
68 - def("Declaration"),
69 - def("Expression"), // Implies default.
70 - null
71 - ))
72 - .field("specifiers", [or(
73 - def("ExportSpecifier"),
74 - def("ExportBatchSpecifier")
75 - )], defaults.emptyArray)
76 - .field("source", or(
77 - def("Literal"),
78 - null
79 - ), defaults["null"]);
80 -
81 - def("ImportDeclaration")
82 - .bases("Declaration")
83 - .build("specifiers", "source", "importKind")
84 - .field("specifiers", [or(
85 - def("ImportSpecifier"),
86 - def("ImportNamespaceSpecifier"),
87 - def("ImportDefaultSpecifier")
88 - )], defaults.emptyArray)
89 - .field("source", def("Literal"))
90 - .field("importKind", or(
91 - "value",
92 - "type"
93 - ), function() {
94 - return "value";
95 - });
96 -
97 - def("Block")
98 - .bases("Comment")
99 - .build("value", /*optional:*/ "leading", "trailing");
100 -
101 - def("Line")
102 - .bases("Comment")
103 - .build("value", /*optional:*/ "leading", "trailing");
104 -};
...\ No newline at end of file ...\ No newline at end of file
1 -module.exports = function (fork) {
2 - fork.use(require("./es7"));
3 -
4 - var types = fork.use(require("../lib/types"));
5 - var def = types.Type.def;
6 - var or = types.Type.or;
7 - var defaults = fork.use(require("../lib/shared")).defaults;
8 -
9 - // Type Annotations
10 - def("Type").bases("Node");
11 -
12 - def("AnyTypeAnnotation")
13 - .bases("Type")
14 - .build();
15 -
16 - def("EmptyTypeAnnotation")
17 - .bases("Type")
18 - .build();
19 -
20 - def("MixedTypeAnnotation")
21 - .bases("Type")
22 - .build();
23 -
24 - def("VoidTypeAnnotation")
25 - .bases("Type")
26 - .build();
27 -
28 - def("NumberTypeAnnotation")
29 - .bases("Type")
30 - .build();
31 -
32 - def("NumberLiteralTypeAnnotation")
33 - .bases("Type")
34 - .build("value", "raw")
35 - .field("value", Number)
36 - .field("raw", String);
37 -
38 - // Babylon 6 differs in AST from Flow
39 - // same as NumberLiteralTypeAnnotation
40 - def("NumericLiteralTypeAnnotation")
41 - .bases("Type")
42 - .build("value", "raw")
43 - .field("value", Number)
44 - .field("raw", String);
45 -
46 - def("StringTypeAnnotation")
47 - .bases("Type")
48 - .build();
49 -
50 - def("StringLiteralTypeAnnotation")
51 - .bases("Type")
52 - .build("value", "raw")
53 - .field("value", String)
54 - .field("raw", String);
55 -
56 - def("BooleanTypeAnnotation")
57 - .bases("Type")
58 - .build();
59 -
60 - def("BooleanLiteralTypeAnnotation")
61 - .bases("Type")
62 - .build("value", "raw")
63 - .field("value", Boolean)
64 - .field("raw", String);
65 -
66 - def("TypeAnnotation")
67 - .bases("Node")
68 - .build("typeAnnotation")
69 - .field("typeAnnotation", def("Type"));
70 -
71 - def("NullableTypeAnnotation")
72 - .bases("Type")
73 - .build("typeAnnotation")
74 - .field("typeAnnotation", def("Type"));
75 -
76 - def("NullLiteralTypeAnnotation")
77 - .bases("Type")
78 - .build();
79 -
80 - def("NullTypeAnnotation")
81 - .bases("Type")
82 - .build();
83 -
84 - def("ThisTypeAnnotation")
85 - .bases("Type")
86 - .build();
87 -
88 - def("ExistsTypeAnnotation")
89 - .bases("Type")
90 - .build();
91 -
92 - def("ExistentialTypeParam")
93 - .bases("Type")
94 - .build();
95 -
96 - def("FunctionTypeAnnotation")
97 - .bases("Type")
98 - .build("params", "returnType", "rest", "typeParameters")
99 - .field("params", [def("FunctionTypeParam")])
100 - .field("returnType", def("Type"))
101 - .field("rest", or(def("FunctionTypeParam"), null))
102 - .field("typeParameters", or(def("TypeParameterDeclaration"), null));
103 -
104 - def("FunctionTypeParam")
105 - .bases("Node")
106 - .build("name", "typeAnnotation", "optional")
107 - .field("name", def("Identifier"))
108 - .field("typeAnnotation", def("Type"))
109 - .field("optional", Boolean);
110 -
111 - def("ArrayTypeAnnotation")
112 - .bases("Type")
113 - .build("elementType")
114 - .field("elementType", def("Type"));
115 -
116 - def("ObjectTypeAnnotation")
117 - .bases("Type")
118 - .build("properties", "indexers", "callProperties")
119 - .field("properties", [def("ObjectTypeProperty")])
120 - .field("indexers", [def("ObjectTypeIndexer")], defaults.emptyArray)
121 - .field("callProperties",
122 - [def("ObjectTypeCallProperty")],
123 - defaults.emptyArray)
124 - .field("exact", Boolean, defaults["false"]);
125 -
126 - def("ObjectTypeProperty")
127 - .bases("Node")
128 - .build("key", "value", "optional")
129 - .field("key", or(def("Literal"), def("Identifier")))
130 - .field("value", def("Type"))
131 - .field("optional", Boolean)
132 - .field("variance",
133 - or("plus", "minus", null),
134 - defaults["null"]);
135 -
136 - def("ObjectTypeIndexer")
137 - .bases("Node")
138 - .build("id", "key", "value")
139 - .field("id", def("Identifier"))
140 - .field("key", def("Type"))
141 - .field("value", def("Type"))
142 - .field("variance",
143 - or("plus", "minus", null),
144 - defaults["null"]);
145 -
146 - def("ObjectTypeCallProperty")
147 - .bases("Node")
148 - .build("value")
149 - .field("value", def("FunctionTypeAnnotation"))
150 - .field("static", Boolean, defaults["false"]);
151 -
152 - def("QualifiedTypeIdentifier")
153 - .bases("Node")
154 - .build("qualification", "id")
155 - .field("qualification",
156 - or(def("Identifier"),
157 - def("QualifiedTypeIdentifier")))
158 - .field("id", def("Identifier"));
159 -
160 - def("GenericTypeAnnotation")
161 - .bases("Type")
162 - .build("id", "typeParameters")
163 - .field("id", or(def("Identifier"), def("QualifiedTypeIdentifier")))
164 - .field("typeParameters", or(def("TypeParameterInstantiation"), null));
165 -
166 - def("MemberTypeAnnotation")
167 - .bases("Type")
168 - .build("object", "property")
169 - .field("object", def("Identifier"))
170 - .field("property",
171 - or(def("MemberTypeAnnotation"),
172 - def("GenericTypeAnnotation")));
173 -
174 - def("UnionTypeAnnotation")
175 - .bases("Type")
176 - .build("types")
177 - .field("types", [def("Type")]);
178 -
179 - def("IntersectionTypeAnnotation")
180 - .bases("Type")
181 - .build("types")
182 - .field("types", [def("Type")]);
183 -
184 - def("TypeofTypeAnnotation")
185 - .bases("Type")
186 - .build("argument")
187 - .field("argument", def("Type"));
188 -
189 - def("Identifier")
190 - .field("typeAnnotation", or(def("TypeAnnotation"), null), defaults["null"]);
191 -
192 - def("TypeParameterDeclaration")
193 - .bases("Node")
194 - .build("params")
195 - .field("params", [def("TypeParameter")]);
196 -
197 - def("TypeParameterInstantiation")
198 - .bases("Node")
199 - .build("params")
200 - .field("params", [def("Type")]);
201 -
202 - def("TypeParameter")
203 - .bases("Type")
204 - .build("name", "variance", "bound")
205 - .field("name", String)
206 - .field("variance",
207 - or("plus", "minus", null),
208 - defaults["null"])
209 - .field("bound",
210 - or(def("TypeAnnotation"), null),
211 - defaults["null"]);
212 -
213 - def("Function")
214 - .field("returnType",
215 - or(def("TypeAnnotation"), null),
216 - defaults["null"])
217 - .field("typeParameters",
218 - or(def("TypeParameterDeclaration"), null),
219 - defaults["null"]);
220 -
221 - def("ClassProperty")
222 - .build("key", "value", "typeAnnotation", "static")
223 - .field("value", or(def("Expression"), null))
224 - .field("typeAnnotation", or(def("TypeAnnotation"), null))
225 - .field("static", Boolean, defaults["false"])
226 - .field("variance",
227 - or("plus", "minus", null),
228 - defaults["null"]);
229 -
230 - def("ClassImplements")
231 - .field("typeParameters",
232 - or(def("TypeParameterInstantiation"), null),
233 - defaults["null"]);
234 -
235 - def("InterfaceDeclaration")
236 - .bases("Declaration")
237 - .build("id", "body", "extends")
238 - .field("id", def("Identifier"))
239 - .field("typeParameters",
240 - or(def("TypeParameterDeclaration"), null),
241 - defaults["null"])
242 - .field("body", def("ObjectTypeAnnotation"))
243 - .field("extends", [def("InterfaceExtends")]);
244 -
245 - def("DeclareInterface")
246 - .bases("InterfaceDeclaration")
247 - .build("id", "body", "extends");
248 -
249 - def("InterfaceExtends")
250 - .bases("Node")
251 - .build("id")
252 - .field("id", def("Identifier"))
253 - .field("typeParameters", or(def("TypeParameterInstantiation"), null));
254 -
255 - def("TypeAlias")
256 - .bases("Declaration")
257 - .build("id", "typeParameters", "right")
258 - .field("id", def("Identifier"))
259 - .field("typeParameters", or(def("TypeParameterDeclaration"), null))
260 - .field("right", def("Type"));
261 -
262 - def("DeclareTypeAlias")
263 - .bases("TypeAlias")
264 - .build("id", "typeParameters", "right");
265 -
266 - def("TypeCastExpression")
267 - .bases("Expression")
268 - .build("expression", "typeAnnotation")
269 - .field("expression", def("Expression"))
270 - .field("typeAnnotation", def("TypeAnnotation"));
271 -
272 - def("TupleTypeAnnotation")
273 - .bases("Type")
274 - .build("types")
275 - .field("types", [def("Type")]);
276 -
277 - def("DeclareVariable")
278 - .bases("Statement")
279 - .build("id")
280 - .field("id", def("Identifier"));
281 -
282 - def("DeclareFunction")
283 - .bases("Statement")
284 - .build("id")
285 - .field("id", def("Identifier"));
286 -
287 - def("DeclareClass")
288 - .bases("InterfaceDeclaration")
289 - .build("id");
290 -
291 - def("DeclareModule")
292 - .bases("Statement")
293 - .build("id", "body")
294 - .field("id", or(def("Identifier"), def("Literal")))
295 - .field("body", def("BlockStatement"));
296 -
297 - def("DeclareModuleExports")
298 - .bases("Statement")
299 - .build("typeAnnotation")
300 - .field("typeAnnotation", def("Type"));
301 -
302 - def("DeclareExportDeclaration")
303 - .bases("Declaration")
304 - .build("default", "declaration", "specifiers", "source")
305 - .field("default", Boolean)
306 - .field("declaration", or(
307 - def("DeclareVariable"),
308 - def("DeclareFunction"),
309 - def("DeclareClass"),
310 - def("Type"), // Implies default.
311 - null
312 - ))
313 - .field("specifiers", [or(
314 - def("ExportSpecifier"),
315 - def("ExportBatchSpecifier")
316 - )], defaults.emptyArray)
317 - .field("source", or(
318 - def("Literal"),
319 - null
320 - ), defaults["null"]);
321 -
322 - def("DeclareExportAllDeclaration")
323 - .bases("Declaration")
324 - .build("source")
325 - .field("source", or(
326 - def("Literal"),
327 - null
328 - ), defaults["null"]);
329 -};
1 -module.exports = function (fork) {
2 - fork.use(require("./es7"));
3 -
4 - var types = fork.use(require("../lib/types"));
5 - var def = types.Type.def;
6 - var or = types.Type.or;
7 - var defaults = fork.use(require("../lib/shared")).defaults;
8 -
9 - def("JSXAttribute")
10 - .bases("Node")
11 - .build("name", "value")
12 - .field("name", or(def("JSXIdentifier"), def("JSXNamespacedName")))
13 - .field("value", or(
14 - def("Literal"), // attr="value"
15 - def("JSXExpressionContainer"), // attr={value}
16 - null // attr= or just attr
17 - ), defaults["null"]);
18 -
19 - def("JSXIdentifier")
20 - .bases("Identifier")
21 - .build("name")
22 - .field("name", String);
23 -
24 - def("JSXNamespacedName")
25 - .bases("Node")
26 - .build("namespace", "name")
27 - .field("namespace", def("JSXIdentifier"))
28 - .field("name", def("JSXIdentifier"));
29 -
30 - def("JSXMemberExpression")
31 - .bases("MemberExpression")
32 - .build("object", "property")
33 - .field("object", or(def("JSXIdentifier"), def("JSXMemberExpression")))
34 - .field("property", def("JSXIdentifier"))
35 - .field("computed", Boolean, defaults.false);
36 -
37 - var JSXElementName = or(
38 - def("JSXIdentifier"),
39 - def("JSXNamespacedName"),
40 - def("JSXMemberExpression")
41 - );
42 -
43 - def("JSXSpreadAttribute")
44 - .bases("Node")
45 - .build("argument")
46 - .field("argument", def("Expression"));
47 -
48 - var JSXAttributes = [or(
49 - def("JSXAttribute"),
50 - def("JSXSpreadAttribute")
51 - )];
52 -
53 - def("JSXExpressionContainer")
54 - .bases("Expression")
55 - .build("expression")
56 - .field("expression", def("Expression"));
57 -
58 - def("JSXElement")
59 - .bases("Expression")
60 - .build("openingElement", "closingElement", "children")
61 - .field("openingElement", def("JSXOpeningElement"))
62 - .field("closingElement", or(def("JSXClosingElement"), null), defaults["null"])
63 - .field("children", [or(
64 - def("JSXElement"),
65 - def("JSXExpressionContainer"),
66 - def("JSXText"),
67 - def("Literal") // TODO Esprima should return JSXText instead.
68 - )], defaults.emptyArray)
69 - .field("name", JSXElementName, function () {
70 - // Little-known fact: the `this` object inside a default function
71 - // is none other than the partially-built object itself, and any
72 - // fields initialized directly from builder function arguments
73 - // (like openingElement, closingElement, and children) are
74 - // guaranteed to be available.
75 - return this.openingElement.name;
76 - }, true) // hidden from traversal
77 - .field("selfClosing", Boolean, function () {
78 - return this.openingElement.selfClosing;
79 - }, true) // hidden from traversal
80 - .field("attributes", JSXAttributes, function () {
81 - return this.openingElement.attributes;
82 - }, true); // hidden from traversal
83 -
84 - def("JSXOpeningElement")
85 - .bases("Node") // TODO Does this make sense? Can't really be an JSXElement.
86 - .build("name", "attributes", "selfClosing")
87 - .field("name", JSXElementName)
88 - .field("attributes", JSXAttributes, defaults.emptyArray)
89 - .field("selfClosing", Boolean, defaults["false"]);
90 -
91 - def("JSXClosingElement")
92 - .bases("Node") // TODO Same concern.
93 - .build("name")
94 - .field("name", JSXElementName);
95 -
96 - def("JSXText")
97 - .bases("Literal")
98 - .build("value")
99 - .field("value", String);
100 -
101 - def("JSXEmptyExpression").bases("Expression").build();
102 -
103 -};
...\ No newline at end of file ...\ No newline at end of file
1 -module.exports = function (fork) {
2 - fork.use(require("./core"));
3 - var types = fork.use(require("../lib/types"));
4 - var def = types.Type.def;
5 - var or = types.Type.or;
6 - var shared = fork.use(require("../lib/shared"));
7 - var geq = shared.geq;
8 - var defaults = shared.defaults;
9 -
10 - def("Function")
11 - // SpiderMonkey allows expression closures: function(x) x+1
12 - .field("body", or(def("BlockStatement"), def("Expression")));
13 -
14 - def("ForInStatement")
15 - .build("left", "right", "body", "each")
16 - .field("each", Boolean, defaults["false"]);
17 -
18 - def("ForOfStatement")
19 - .bases("Statement")
20 - .build("left", "right", "body")
21 - .field("left", or(
22 - def("VariableDeclaration"),
23 - def("Expression")))
24 - .field("right", def("Expression"))
25 - .field("body", def("Statement"));
26 -
27 - def("LetStatement")
28 - .bases("Statement")
29 - .build("head", "body")
30 - // TODO Deviating from the spec by reusing VariableDeclarator here.
31 - .field("head", [def("VariableDeclarator")])
32 - .field("body", def("Statement"));
33 -
34 - def("LetExpression")
35 - .bases("Expression")
36 - .build("head", "body")
37 - // TODO Deviating from the spec by reusing VariableDeclarator here.
38 - .field("head", [def("VariableDeclarator")])
39 - .field("body", def("Expression"));
40 -
41 - def("GraphExpression")
42 - .bases("Expression")
43 - .build("index", "expression")
44 - .field("index", geq(0))
45 - .field("expression", def("Literal"));
46 -
47 - def("GraphIndexExpression")
48 - .bases("Expression")
49 - .build("index")
50 - .field("index", geq(0));
51 -};
...\ No newline at end of file ...\ No newline at end of file
1 -module.exports = function (defs) {
2 - var used = [];
3 - var usedResult = [];
4 - var fork = {};
5 -
6 - function use(plugin) {
7 - var idx = used.indexOf(plugin);
8 - if (idx === -1) {
9 - idx = used.length;
10 - used.push(plugin);
11 - usedResult[idx] = plugin(fork);
12 - }
13 - return usedResult[idx];
14 - }
15 -
16 - fork.use = use;
17 -
18 - var types = use(require('./lib/types'));
19 -
20 - defs.forEach(use);
21 -
22 - types.finalize();
23 -
24 - var exports = {
25 - Type: types.Type,
26 - builtInTypes: types.builtInTypes,
27 - namedTypes: types.namedTypes,
28 - builders: types.builders,
29 - defineMethod: types.defineMethod,
30 - getFieldNames: types.getFieldNames,
31 - getFieldValue: types.getFieldValue,
32 - eachField: types.eachField,
33 - someField: types.someField,
34 - getSupertypeNames: types.getSupertypeNames,
35 - astNodesAreEquivalent: use(require("./lib/equiv")),
36 - finalize: types.finalize,
37 - Path: use(require('./lib/path')),
38 - NodePath: use(require("./lib/node-path")),
39 - PathVisitor: use(require("./lib/path-visitor")),
40 - use: use
41 - };
42 -
43 - exports.visit = exports.PathVisitor.visit;
44 -
45 - return exports;
46 -};
...\ No newline at end of file ...\ No newline at end of file
1 -module.exports = function (fork) {
2 - var types = fork.use(require('../lib/types'));
3 - var getFieldNames = types.getFieldNames;
4 - var getFieldValue = types.getFieldValue;
5 - var isArray = types.builtInTypes.array;
6 - var isObject = types.builtInTypes.object;
7 - var isDate = types.builtInTypes.Date;
8 - var isRegExp = types.builtInTypes.RegExp;
9 - var hasOwn = Object.prototype.hasOwnProperty;
10 -
11 - function astNodesAreEquivalent(a, b, problemPath) {
12 - if (isArray.check(problemPath)) {
13 - problemPath.length = 0;
14 - } else {
15 - problemPath = null;
16 - }
17 -
18 - return areEquivalent(a, b, problemPath);
19 - }
20 -
21 - astNodesAreEquivalent.assert = function (a, b) {
22 - var problemPath = [];
23 - if (!astNodesAreEquivalent(a, b, problemPath)) {
24 - if (problemPath.length === 0) {
25 - if (a !== b) {
26 - throw new Error("Nodes must be equal");
27 - }
28 - } else {
29 - throw new Error(
30 - "Nodes differ in the following path: " +
31 - problemPath.map(subscriptForProperty).join("")
32 - );
33 - }
34 - }
35 - };
36 -
37 - function subscriptForProperty(property) {
38 - if (/[_$a-z][_$a-z0-9]*/i.test(property)) {
39 - return "." + property;
40 - }
41 - return "[" + JSON.stringify(property) + "]";
42 - }
43 -
44 - function areEquivalent(a, b, problemPath) {
45 - if (a === b) {
46 - return true;
47 - }
48 -
49 - if (isArray.check(a)) {
50 - return arraysAreEquivalent(a, b, problemPath);
51 - }
52 -
53 - if (isObject.check(a)) {
54 - return objectsAreEquivalent(a, b, problemPath);
55 - }
56 -
57 - if (isDate.check(a)) {
58 - return isDate.check(b) && (+a === +b);
59 - }
60 -
61 - if (isRegExp.check(a)) {
62 - return isRegExp.check(b) && (
63 - a.source === b.source &&
64 - a.global === b.global &&
65 - a.multiline === b.multiline &&
66 - a.ignoreCase === b.ignoreCase
67 - );
68 - }
69 -
70 - return a == b;
71 - }
72 -
73 - function arraysAreEquivalent(a, b, problemPath) {
74 - isArray.assert(a);
75 - var aLength = a.length;
76 -
77 - if (!isArray.check(b) || b.length !== aLength) {
78 - if (problemPath) {
79 - problemPath.push("length");
80 - }
81 - return false;
82 - }
83 -
84 - for (var i = 0; i < aLength; ++i) {
85 - if (problemPath) {
86 - problemPath.push(i);
87 - }
88 -
89 - if (i in a !== i in b) {
90 - return false;
91 - }
92 -
93 - if (!areEquivalent(a[i], b[i], problemPath)) {
94 - return false;
95 - }
96 -
97 - if (problemPath) {
98 - var problemPathTail = problemPath.pop();
99 - if (problemPathTail !== i) {
100 - throw new Error("" + problemPathTail);
101 - }
102 - }
103 - }
104 -
105 - return true;
106 - }
107 -
108 - function objectsAreEquivalent(a, b, problemPath) {
109 - isObject.assert(a);
110 - if (!isObject.check(b)) {
111 - return false;
112 - }
113 -
114 - // Fast path for a common property of AST nodes.
115 - if (a.type !== b.type) {
116 - if (problemPath) {
117 - problemPath.push("type");
118 - }
119 - return false;
120 - }
121 -
122 - var aNames = getFieldNames(a);
123 - var aNameCount = aNames.length;
124 -
125 - var bNames = getFieldNames(b);
126 - var bNameCount = bNames.length;
127 -
128 - if (aNameCount === bNameCount) {
129 - for (var i = 0; i < aNameCount; ++i) {
130 - var name = aNames[i];
131 - var aChild = getFieldValue(a, name);
132 - var bChild = getFieldValue(b, name);
133 -
134 - if (problemPath) {
135 - problemPath.push(name);
136 - }
137 -
138 - if (!areEquivalent(aChild, bChild, problemPath)) {
139 - return false;
140 - }
141 -
142 - if (problemPath) {
143 - var problemPathTail = problemPath.pop();
144 - if (problemPathTail !== name) {
145 - throw new Error("" + problemPathTail);
146 - }
147 - }
148 - }
149 -
150 - return true;
151 - }
152 -
153 - if (!problemPath) {
154 - return false;
155 - }
156 -
157 - // Since aNameCount !== bNameCount, we need to find some name that's
158 - // missing in aNames but present in bNames, or vice-versa.
159 -
160 - var seenNames = Object.create(null);
161 -
162 - for (i = 0; i < aNameCount; ++i) {
163 - seenNames[aNames[i]] = true;
164 - }
165 -
166 - for (i = 0; i < bNameCount; ++i) {
167 - name = bNames[i];
168 -
169 - if (!hasOwn.call(seenNames, name)) {
170 - problemPath.push(name);
171 - return false;
172 - }
173 -
174 - delete seenNames[name];
175 - }
176 -
177 - for (name in seenNames) {
178 - problemPath.push(name);
179 - break;
180 - }
181 -
182 - return false;
183 - }
184 -
185 - return astNodesAreEquivalent;
186 -};
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.