UNPKG

gpii-universal

Version:

Cross platform, core components of the GPII personalization infrastructure.

39 lines (26 loc) 1.27 kB
/*! GPII INI Settings Handler Copyright 2012 Raising the Floor - International Licensed under the New BSD license. You may not use this file except in compliance with this License. The research leading to these results has received funding from the European Union's Seventh Framework Programme (FP7/2007-2013) under grant agreement no. 289016. You may obtain a copy of the License at https://github.com/GPII/universal/blob/master/LICENSE.txt */ "use strict"; var fluid = require("infusion"), gpii = fluid.registerNamespace("gpii"); require("./settingsHandlerUtilities.js"); fluid.registerNamespace("gpii.settingsHandlers.INISettingsHandler.parser"); gpii.settingsHandlers.INISettingsHandler.parser.parse = function (content, options) { return gpii.iniFile.read(content, options); }; gpii.settingsHandlers.INISettingsHandler.parser.stringify = function (content, options) { return gpii.iniFile.writeFromFile(options.filename, content, options); }; /* PUBLIC API FUNCTIONS */ gpii.settingsHandlers.INISettingsHandler.get = gpii.settingsHandlers.makeFileGet(gpii.settingsHandlers.INISettingsHandler.parser); gpii.settingsHandlers.INISettingsHandler.set = gpii.settingsHandlers.makeFileSet(gpii.settingsHandlers.INISettingsHandler.parser);