From 55acfd2179a0c127ccc52dfa3348f3f81a7dd291 Mon Sep 17 00:00:00 2001 From: Noam Okman Date: Fri, 25 Sep 2015 13:27:59 +0300 Subject: [PATCH] App defaults in readme --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index c59e278..070376b 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,22 @@ var nachosConfig = require('nachos-config'); See [settings-file](https://github.com/nachos/settings-file) documentation to see list of available functions +## Extra functions +Nachos config has extra functions on top of the SettingsFile functions + +### App defaults +```js +nachosConfig.getDefaultApp('txt') + .then(function (command) { + // command => /var/bin/gedit.desktop + }); + +nachosConfig.setDefaultApp('txt', '/var/bin/gedit.desktop') + .then(function () { + // saved successfully! + }); +``` + ## Run Tests ``` bash $ npm test