{"id":20700393,"url":"https://github.com/s-a/user-appdata","last_synced_at":"2026-04-03T10:38:47.337Z","repository":{"id":57388637,"uuid":"55627661","full_name":"s-a/user-appdata","owner":"s-a","description":null,"archived":false,"fork":false,"pushed_at":"2016-04-07T18:55:26.000Z","size":16,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T19:34:30.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s-a.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-06T17:43:19.000Z","updated_at":"2016-05-11T10:25:17.000Z","dependencies_parsed_at":"2022-09-19T02:12:43.266Z","dependency_job_id":null,"html_url":"https://github.com/s-a/user-appdata","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-a%2Fuser-appdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-a%2Fuser-appdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-a%2Fuser-appdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-a%2Fuser-appdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-a","download_url":"https://codeload.github.com/s-a/user-appdata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250334171,"owners_count":21413522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T00:35:10.613Z","updated_at":"2026-04-03T10:38:47.306Z","avatar_url":"https://github.com/s-a.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# user-appdata\r\n\r\n\r\n[![NPM Version](http://img.shields.io/npm/v/user-appdata.svg)](https://www.npmjs.org/package/user-appdata)\r\n[![Build Status](https://travis-ci.org/s-a/user-appdata.svg)](https://travis-ci.org/s-a/user-appdata)\r\n[![Coverage Status](https://coveralls.io/repos/github/s-a/user-appdata/badge.svg?branch=master)](https://coveralls.io/github/s-a/user-appdata?branch=master)\r\n[![Codacy Badge](https://api.codacy.com/project/badge/grade/b90f442f62ae44a4b95a07cbdd69fb85)](https://www.codacy.com/app/stephanahlf/user-appdata)\r\n[![Dependency Status](https://david-dm.org/s-a/user-appdata.svg)](https://david-dm.org/s-a/user-appdata)\r\n[![devDependency Status](https://david-dm.org/s-a/user-appdata/dev-status.svg)](https://david-dm.org/s-a/user-appdata#info=devDependencies)\r\n[![NPM Downloads](https://img.shields.io/npm/dm/user-appdata.svg)](https://www.npmjs.org/package/user-appdata)\r\n[![Massachusetts Institute of Technology (MIT)](https://s-a.github.io/license/img/mit.svg)](/LICENSE.md#mit)\r\n[![Donate](http://s-a.github.io/donate/donate.svg)](http://s-a.github.io/donate/)\r\n\r\n\r\nLoad and save application data platform independent without additional configuration based on the current users system ```APP_DATA``` folder.\r\n\r\n\r\n## Contructor parms\r\n - appname (not optional) - A unique app name. Best one is the ```name``` property from your ```package.json```.\r\n - filename (optional) - Default ```config.json```.\r\n - defaultSettings (optional).\r\n\r\n\r\n\r\n## Methods\r\n - ```load()```\r\n - ```save()``` \r\n - ```uninstall()```\r\n - ```setConfigFilename(filename /* string */)```\r\n\r\n### Example\r\n```javascript\r\nvar Config = require(\"user-appdata\");\r\nvar config = new Config({appname : \"myApp\", defaultSettings : {\"foo\" : \"bar\"}});\r\nconsole.log(config);\r\n```\r\n\r\n### Yields on Microsoft Windows:\r\n```javascript\r\n{\r\n\tsettings: {\r\n\t\tfoo: 'bar'\r\n\t},\r\n\tappName: 'myApp',\r\n\tdataFolder: 'C:\\\\Users\\\\Stephan\\\\AppData\\\\Roaming\\\\myApp',\r\n\tfilename: 'C:\\\\Users\\\\Stephan\\\\AppData\\\\Roaming\\\\myApp\\\\config.json' \r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-a%2Fuser-appdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-a%2Fuser-appdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-a%2Fuser-appdata/lists"}