Comparing version 0.4.0 to 0.4.1
@@ -12,26 +12,12 @@ /* parser generated by jison 0.4.2 */ | ||
switch (yystate) { | ||
case 1: var data = parser.toml.data; parser.toml.data = {}; parser.toml.currentGroup = null; return data; | ||
case 1: return this.toml.data; | ||
break; | ||
case 2: this.$ = $$[$0] | ||
break; | ||
case 9: parser.toml.set($$[$0-2], $$[$0]); | ||
case 9: this.toml = set(this.toml, $$[$0-2], $$[$0]); | ||
break; | ||
case 10: this.$ = $$[$0] | ||
break; | ||
case 11: | ||
parser.toml.setCurrentGroup($$[$0-1]); | ||
case 11: this.toml = setCurrentGroup(this.toml, $$[$0-1]); | ||
break; | ||
case 14: this.$ = $$[$0] | ||
break; | ||
case 15: this.$ = $$[$0] | ||
break; | ||
case 16: this.$ = $$[$0] | ||
break; | ||
case 17: this.$ = $$[$0] | ||
break; | ||
case 18: this.$ = $$[$0] | ||
break; | ||
case 19: this.$ = $$[$0] | ||
break; | ||
case 20: this.$ = parseString($$[$0]) | ||
@@ -225,5 +211,20 @@ break; | ||
parser.toml = { | ||
data: {}, | ||
currentGroup: null, | ||
function set(instance, key, value) { | ||
instance = instance || new TomlInstance(); | ||
instance.set(key, value); | ||
return instance; | ||
} | ||
function setCurrentGroup(instance, group) { | ||
instance = instance || new TomlInstance(); | ||
instance.setCurrentGroup(group); | ||
return instance; | ||
} | ||
function TomlInstance() { | ||
this.data = {}; | ||
this.currentGroup = null; | ||
}; | ||
TomlInstance.prototype = { | ||
setCurrentGroup: function(group) { | ||
@@ -238,3 +239,3 @@ if (deepValue(this.data, group)) | ||
deepValue(this.data, key, value); | ||
} | ||
}, | ||
}; | ||
@@ -241,0 +242,0 @@ /* generated by jison-lex 0.1.0 */ |
{ | ||
"name": "toml", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "TOML parser for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -57,1 +57,6 @@ TOML Parser for Node.js | ||
* Node 0.9 | ||
License | ||
------- | ||
toml-node is licensed under the MIT license agreement. See the LICENSE file for more information. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31047
12
62
0
616