{"id":19553399,"url":"https://github.com/digicorp/count-management-module","last_synced_at":"2025-08-23T06:03:42.794Z","repository":{"id":57209789,"uuid":"71103051","full_name":"digicorp/count-management-module","owner":"digicorp","description":"count-management-module is used to manage counter for specific key passed by the user. It also manage past state of counter for all key through database entry.","archived":false,"fork":false,"pushed_at":"2018-08-10T05:35:19.000Z","size":2304,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-16T18:48:28.271Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digicorp.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":"2016-10-17T05:32:49.000Z","updated_at":"2018-08-10T05:35:21.000Z","dependencies_parsed_at":"2022-08-29T14:11:52.340Z","dependency_job_id":null,"html_url":"https://github.com/digicorp/count-management-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/digicorp/count-management-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digicorp%2Fcount-management-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digicorp%2Fcount-management-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digicorp%2Fcount-management-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digicorp%2Fcount-management-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digicorp","download_url":"https://codeload.github.com/digicorp/count-management-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digicorp%2Fcount-management-module/sbom","scorecard":{"id":341807,"data":{"date":"2025-08-11","repo":{"name":"github.com/digicorp/count-management-module","commit":"9259311506a4024cf1e093fad0d3adbef45c16df"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}}]},"last_synced_at":"2025-08-18T06:05:15.091Z","repository_id":57209789,"created_at":"2025-08-18T06:05:15.091Z","updated_at":"2025-08-18T06:05:15.091Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745659,"owners_count":24813515,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11T04:23:06.818Z","updated_at":"2025-08-23T06:03:42.761Z","avatar_url":"https://github.com/digicorp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## count-management-module\n#### Author: Chandrakant Thakkar\n##### Created on: 14th Oct 2016\n\n---\n###### count-management-module is used to manage counter for specific key passed by the user. It also manage past state of counter for all key through database entry.\n\n- To use this module, It requires 'tbl_uniquekey' table into database.'tbl_uniquekey' table defination is as following.\n\n| Field | Type | Key | Default |\n| :------------- | :------------- |:------------- |:------------- |\n| UK_key | varchar(30) | NO | PRI |\n| UK_value | int(11) | YES | - |\n\n- mysql script for table 'tbl_uniquekey'\n```javascript\nCREATE TABLE `tbl_uniquekey` (\n  `UK_key` varchar(30) NOT NULL,\n  `UK_value` int(11) DEFAULT NULL,\n  PRIMARY KEY (`UK_key`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n```\n\n---\n#### Function\n\n * _getUniqueNumber :_\n\n - _Sample 1_\n ```javascript  \n var generateNextCounter = require('count-management-module');  \n var sendData = {\n   \"id\": \"UNIQUEKEY\",//id: unique key for which it create unique counter\n   \"count\": 1,//count: update counter value to plus 1 in 'tbl_uniquekey' table at a time\n   \"dbConfig\": sampleConfig\n };\n generateNextCounter.getUniqueNumber(sendData, {}, function(data) {\n var nextCounter=data.content;\n });\n ```\n\n\n\n - _sampleConfig_ : Configuration for database connection. (As given below)\n ```javascript\n var sampleConfig = {\n   type: \"database\",\n   engine: 'MyISAM',\n   databaseType: 'mysql',\n   database: 'database',\n   host: \"hostname\",\n   port: \"port\",\n   user: \"user\",\n   password: \"password\",\n   cacheResponse: false\n };\n ```\n\n - In Sample 1 it creates one entry into table 'tbl_uniquekey' with UK_key as 'UNIQUEKEY' and UK_value as 1 and return 1 value as next counter in 'data.content' variable. while calling same method again it update entry into table 'tbl_uniquekey' for UK_key 'UNIQUEKEY' with UK_value as 2 and return next counter value as 2 in 'data.content' variable.\n\n\n - _Sample 2_\n ```javascript  \n var generateNextCounter = require('count-management-module');  \n var sendData = {\n   \"id\": \"UNIQUEKEY\",//id: unique key for which it create unique counter\n   \"count\": 5,//count: update counter value to plus 5 in 'tbl_uniquekey' table at a time\n   \"dbConfig\": sampleConfig\n };\n generateNextCounter.getUniqueNumber(sendData, {}, function(data) {\n   var counterStart=data.content;\n   for(i=0;i\u003c5;i++){\n    console.log(\"counter value:\"+counterStart);\n    counterStart=counterStart+1;\n   }\n });\n   ```\n - In Sample 2 we require 5 counters at a same time, it creates one entry into table 'tbl_uniquekey' with UK_key as 'UNIQUEKEY' and UK_value as 5 and return 1 value as next counter in 'data.content' variable. now we can generate all five counter for key 'UNIQUEKEY' with starting value as 1 and go till 5 using loop.\n\n - while calling same method again it update entry into table 'tbl_uniquekey' for UK_key 'UNIQUEKEY' with UK_value as 10 and return next counter value as 6 in 'data.content' variable.now we can generate all five counter for key 'UNIQUEKEY' with starting value as 6 and go till 10 using loop.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigicorp%2Fcount-management-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigicorp%2Fcount-management-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigicorp%2Fcount-management-module/lists"}