nav tabs on admin dashboard
This commit is contained in:
10
node_modules/fastparse/.eslintrc
generated
vendored
10
node_modules/fastparse/.eslintrc
generated
vendored
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"rules": {
|
||||
"strict": 0,
|
||||
"curly": 0,
|
||||
"quotes": 0
|
||||
}
|
||||
}
|
||||
2
node_modules/fastparse/.npmignore
generated
vendored
2
node_modules/fastparse/.npmignore
generated
vendored
@@ -1,2 +0,0 @@
|
||||
node_modules
|
||||
coverage
|
||||
12
node_modules/fastparse/.travis.yml
generated
vendored
12
node_modules/fastparse/.travis.yml
generated
vendored
@@ -1,12 +0,0 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
- "iojs"
|
||||
script: npm run travis
|
||||
|
||||
before_install:
|
||||
- '[ "${TRAVIS_NODE_VERSION}" != "0.10" ] || npm install -g npm'
|
||||
|
||||
after_success: cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose && rm -rf ./coverage
|
||||
13
node_modules/fastparse/package.json
generated
vendored
13
node_modules/fastparse/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "fastparse@^1.1.1",
|
||||
"_id": "fastparse@1.1.1",
|
||||
"_id": "fastparse@1.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=",
|
||||
"_integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
|
||||
"_location": "/fastparse",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -19,8 +19,8 @@
|
||||
"/css-selector-tokenizer",
|
||||
"/html-loader"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz",
|
||||
"_shasum": "d1e2643b38a94d7583b479060e6c4affc94071f8",
|
||||
"_resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",
|
||||
"_shasum": "91728c5a5942eced8531283c79441ee4122c35a9",
|
||||
"_spec": "fastparse@^1.1.1",
|
||||
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\css-selector-tokenizer",
|
||||
"author": {
|
||||
@@ -39,6 +39,9 @@
|
||||
"mocha": "^2.2.5",
|
||||
"should": "^6.0.3"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/webpack/fastparse",
|
||||
"keywords": [
|
||||
"parser",
|
||||
@@ -60,5 +63,5 @@
|
||||
"test": "mocha",
|
||||
"travis": "npm run cover -- --report lcovonly"
|
||||
},
|
||||
"version": "1.1.1"
|
||||
"version": "1.1.2"
|
||||
}
|
||||
|
||||
131
node_modules/fastparse/test/Parser.test.js
generated
vendored
131
node_modules/fastparse/test/Parser.test.js
generated
vendored
@@ -1,131 +0,0 @@
|
||||
/*globals describe it */
|
||||
|
||||
require("should");
|
||||
var Parser = require("../");
|
||||
|
||||
var testdata = [
|
||||
{
|
||||
name: "simple string",
|
||||
states: {
|
||||
"start": {
|
||||
"[d-gm-rv]+": function(match, index) {
|
||||
if(!this.data) this.data = [];
|
||||
this.data.push({
|
||||
match: match,
|
||||
index: index
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
string: "abcdefghijklmnopqrstuvwxyz",
|
||||
expected: {
|
||||
data: [
|
||||
{ match: "defg", index: 3 },
|
||||
{ match: "mnopqr", index: 12 },
|
||||
{ match: "v", index: 21 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "state switing",
|
||||
states: {
|
||||
"number": {
|
||||
"([0-9]+)": function(match, number) {
|
||||
if(!this.data) this.data = {};
|
||||
this.data[this.ident] = +number;
|
||||
delete this.ident;
|
||||
return "start";
|
||||
},
|
||||
"-\\?": true,
|
||||
"\\?": "start"
|
||||
},
|
||||
"start": {
|
||||
"([a-z]+)": function(match, name) {
|
||||
this.ident = name;
|
||||
return "number";
|
||||
}
|
||||
}
|
||||
},
|
||||
string: "a 1 b 2 c f 3 d ? e -? 4",
|
||||
expected: {
|
||||
data: {
|
||||
a: 1, b: 2, c: 3, e: 4
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "state array",
|
||||
states: {
|
||||
"start": [
|
||||
{ "a": function() { this.a = true; } },
|
||||
{
|
||||
"b": function() { this.b = true; },
|
||||
"c": function() { this.c = true; }
|
||||
}
|
||||
]
|
||||
},
|
||||
string: "hello abc",
|
||||
expected: {
|
||||
a: true, b: true, c: true
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "reference other states",
|
||||
states: {
|
||||
"start": [
|
||||
{ "a": function() { this.a = true; } },
|
||||
"bc"
|
||||
],
|
||||
"bc": {
|
||||
"b": function() { this.b = true; },
|
||||
"c": function() { this.c = true; }
|
||||
}
|
||||
},
|
||||
string: "hello abc",
|
||||
expected: {
|
||||
a: true, b: true, c: true
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
describe("Parser", function() {
|
||||
testdata.forEach(function(testcase) {
|
||||
it("should parse " + testcase.name, function() {
|
||||
var parser = new Parser(testcase.states);
|
||||
var actual = parser.parse("start", testcase.string, {});
|
||||
actual.should.be.eql(testcase.expected);
|
||||
});
|
||||
});
|
||||
|
||||
it("should default context to empty object", function() {
|
||||
var parser = new Parser({
|
||||
"a": {
|
||||
"a": function() {
|
||||
this.should.be.eql({});
|
||||
}
|
||||
}
|
||||
});
|
||||
var result = parser.parse("a", "a");
|
||||
result.should.be.eql({});
|
||||
});
|
||||
|
||||
it("should error for unexpected format", function() {
|
||||
(function() {
|
||||
var parser = new Parser({
|
||||
"a": 123
|
||||
});
|
||||
return parser;
|
||||
}).should.throw();
|
||||
});
|
||||
|
||||
it("should error for not existing state", function() {
|
||||
var parser = new Parser({
|
||||
"a": {
|
||||
"a": "b"
|
||||
}
|
||||
});
|
||||
(function() {
|
||||
return parser.parse("a", "a");
|
||||
}).should.throw();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user