{"id":16931626,"url":"https://github.com/romelperez/prhone-scp","last_synced_at":"2026-04-18T14:33:37.390Z","repository":{"id":36349237,"uuid":"40653993","full_name":"romelperez/prhone-scp","owner":"romelperez","description":"Simple config parser","archived":false,"fork":false,"pushed_at":"2017-02-05T03:05:52.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T09:37:52.999Z","etag":null,"topics":["configparser","parser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romelperez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-13T10:57:28.000Z","updated_at":"2017-03-31T04:28:04.000Z","dependencies_parsed_at":"2022-09-21T02:02:44.910Z","dependency_job_id":null,"html_url":"https://github.com/romelperez/prhone-scp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romelperez%2Fprhone-scp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romelperez%2Fprhone-scp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romelperez%2Fprhone-scp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romelperez%2Fprhone-scp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romelperez","download_url":"https://codeload.github.com/romelperez/prhone-scp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244730654,"owners_count":20500491,"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":["configparser","parser"],"created_at":"2024-10-13T20:44:24.079Z","updated_at":"2026-04-18T14:33:32.366Z","avatar_url":"https://github.com/romelperez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PRHONE SCP\n\n[![npm version](https://badge.fury.io/js/prhone-scp.svg)](https://badge.fury.io/js/prhone-scp)\n[![Build Status](https://travis-ci.org/romelperez/prhone-scp.svg?branch=master)](https://travis-ci.org/romelperez/prhone-scp)\n[![prhone](https://img.shields.io/badge/prhone-project-1b38a9.svg)](http://romelperez.com)\n\n\u003e Simple config parser.\n\nParse simple config files to extract configurable information for your projects.\n\n## Install\n\n```bash\nnpm install --save prhone-scp\n```\n\n## Example\n\n### __dirname + '/data/config.conf'\n\n```text\n# Config file.\n# Comments start with \"#\".\n\nUSER romel\n\nPASS 123\n\nNAMES\nmaria\njohn\nkaren\n\nADDRESS\nStreet 987 ave 456\n```\n\n### __dirname + '/app.js'\n\n```js\nvar scp = require('prhone-scp');\n\n// I recommend token names to be uppercase.\nscp.config({\n  //encoding: 'utf8',\n  tokens: {\n    USER: 'line',\n    PASS: 'line',\n    NAMES: 'multiline',\n    ADDRESS: function (data) {\n      data = data.toUpperCase();\n      return data;\n    }\n  }\n});\n\nscp.parse(__dirname +'/data/config.conf', function (err, conf) {\n  if (err) throw err;\n\n  console.log(conf.USER);  // 'romel'\n  console.log(conf.PASS);  // '123'\n  console.log(conf.NAMES);  // ['natalia', 'john', 'karen']\n  console.log(conf.ADDRESS);  // 'STREET 987 AVE 456'\n});\n```\n\n## License\n\n[MIT](https://github.com/romelperez/prhone-scp/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromelperez%2Fprhone-scp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromelperez%2Fprhone-scp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromelperez%2Fprhone-scp/lists"}