{"id":22018581,"url":"https://github.com/codeofnode/key-value","last_synced_at":"2026-04-29T08:06:30.314Z","repository":{"id":30644345,"uuid":"34199920","full_name":"codeofnode/key-value","owner":"codeofnode","description":"Allow client to input key-value pairs","archived":false,"fork":false,"pushed_at":"2016-03-28T04:57:25.000Z","size":6,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T08:11:15.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://jsfiddle.net/codeofnode/w2v1az8q/19/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeofnode.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-19T08:58:26.000Z","updated_at":"2016-03-29T19:08:50.000Z","dependencies_parsed_at":"2022-08-03T14:15:16.720Z","dependency_job_id":null,"html_url":"https://github.com/codeofnode/key-value","commit_stats":null,"previous_names":["nodeofcode/key-value"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeofnode%2Fkey-value","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeofnode%2Fkey-value/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeofnode%2Fkey-value/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeofnode%2Fkey-value/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeofnode","download_url":"https://codeload.github.com/codeofnode/key-value/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245081836,"owners_count":20557856,"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-30T05:12:39.801Z","updated_at":"2025-12-12T04:23:40.603Z","avatar_url":"https://github.com/codeofnode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Key Value Inputer\n## Allow client to input key-values pairs for some operations like interactive searching, raw-json etc.\n\n## Features\n* Interactive and better usability\n* Can set up domain keys, means user can input values only for restrictive keys\n* Allow parsing as Number, Boolean etc\n* Allow user to input custom string for value\n\n## Demo\n  http://jsfiddle.net/codeofnode/w2v1az8q/19/\n\n## Dependencies\n* JQuery\n* Select2\n\n## Install\n\n    bower install key-value\n\n## How to use\n\n```html\n  \u003cinput type=\"hidden\"\u003e\u003c/input\u003e\n  \u003c!-- the element on which select2 will be called --\u003e\n```\n```javascript\n  var DOMAIN = { // You have to provide non-empty domain object, client can input any of for keys pool, alpha, casing or symbols, in this case.\n    pool : { userInput : true, userInputMsg : 'Type your characters and press space' }, // for allow user to input his own value use `userInput` : true\n    alpha : { parse : 'Boolean', data : ['true','false'] }, // `parse` tells how to compile, parse string to boolean in this case\n    casing : { data : ['upper','lower'] },// `data` tells the list of available values for corresponding key\n    symbols : { name : 'isSymbolAllowed', parse : 'Boolean', data : ['true','false'] } // put `name` if you want to display user readable key\n  };\n  var kv = new KV($('input'),DOMAIN); // where KV is result on requiring `key-value`\n  //...\n  //...\n  //...\n  //...\n  var currentValue = kv.get(); // To extract the current object of key-value pairs\n```\n\n## Roadmap\n* To support select2 v4\n* Trigger custom events whenever a key-value pair added or removed\n\n## Any hurdles?\n\u003e Found anything difficult to understand? or some bug or some improvement?. Create an issue [issue](https://github.com/nodeofcode/key-value/issues) for the same.\n\n## License\n\nKey Value Inputer is released under the MIT license:\n\nhttp://www.opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeofnode%2Fkey-value","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeofnode%2Fkey-value","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeofnode%2Fkey-value/lists"}