|
|
@ -1,5 +1,5 @@ |
|
|
|
|
|
|
|
|
|
|
|
var soljson = require('./bin/soljson-latest.js'); |
|
|
|
function setupMethods (soljson){ |
|
|
|
|
|
|
|
|
|
|
|
var compileJSON = soljson.cwrap("compileJSON", "string", ["string", "number"]); |
|
|
|
var compileJSON = soljson.cwrap("compileJSON", "string", ["string", "number"]); |
|
|
|
var compileJSONMulti = |
|
|
|
var compileJSONMulti = |
|
|
@ -16,8 +16,15 @@ var compile = function(input, optimise) { |
|
|
|
return JSON.parse(result); |
|
|
|
return JSON.parse(result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var version = soljson.cwrap("version", "string", []); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
return { |
|
|
|
|
|
|
|
version: version, |
|
|
|
compile: compile, |
|
|
|
compile: compile, |
|
|
|
version: soljson.cwrap("version", "string", []) |
|
|
|
useVersion: function( versionString ){ |
|
|
|
|
|
|
|
return setupMethods( require('./bin/soljson-' + versionString + '.js' ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = setupMethods( require('./bin/soljson-latest.js') ); |
|
|
|