Comparing version 0.6.0 to 0.6.1
@@ -15,3 +15,3 @@ /** | ||
Object.defineProperty(loader, 'version', { | ||
value: '0.6.0' | ||
value: '0.6.1' | ||
}); | ||
@@ -18,0 +18,0 @@ |
{ | ||
"name": "decypher", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "A handful of cypher utilities for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -97,3 +97,2 @@ [](https://travis-ci.org/Yomguithereal/decypher) | ||
// - multiple.cypher | ||
decypher('./folder'); | ||
@@ -112,2 +111,4 @@ >>> { | ||
Now that if what you want is only to parse cypher strings because you retrieved the files on your, own, you can alternatively use `decypher.parse`. | ||
## Query builder | ||
@@ -114,0 +115,0 @@ |
@@ -22,3 +22,3 @@ /** | ||
var nm = line.match(/\/\/\s+name:(.*)/i); | ||
var nm = line.match(/\/\/\s*name:(.*)/i); | ||
@@ -41,8 +41,12 @@ // Name | ||
if (~string.search(/\/\/\s?name:/i)) | ||
blocks = string.split(/(?=\/\/\s+name:)/ig); | ||
if (/\/\/\s*name:/i.test(string)) | ||
blocks = string.split(/(?=\/\/\s*name:)/ig); | ||
else | ||
blocks = [string]; | ||
return blocks.map(parseBlock); | ||
return blocks | ||
.map(parseBlock) | ||
.filter(function(data) { | ||
return !!data.body; | ||
}); | ||
} | ||
@@ -49,0 +53,0 @@ |
29097
685
385