Comparing version 0.1.0 to 0.1.1
_ = require('lodash'); | ||
var Parser = {}; | ||
module.exports.parse = function(value) { | ||
Parser = (function() { | ||
Parser.__proto__.parse = function(value) { | ||
// get keys of key(space):(space)"value" pattern. | ||
var matches = String(value).match(/\S*(?=\s*:\s*\".*\")/gmi); | ||
// get keys of key(space):(space)"value" pattern. | ||
var matches = value.match(/\S*(?=\s*:\s*\".*\")/gmi); | ||
// remove duplicates and null items | ||
var unimatches = _.uniq(matches, false).filter(function(e){return e}); | ||
// remove duplicates and null items | ||
var unimatches = _.uniq(matches, false).filter(function(e){return e}); | ||
// generate json | ||
var json_out = {double_quotes:unimatches}; | ||
// generate json | ||
var json_out = {double_quotes:unimatches}; | ||
return json_out; | ||
}; | ||
return Parser; | ||
})(); | ||
module.exports = Parser; | ||
return json_out; | ||
}; |
{ | ||
"name": "meta-yaml", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "JSON Metafile generator for rsa-yaml", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
3049
14