{"id":20645546,"url":"https://github.com/helpfulscripts/hsdatab","last_synced_at":"2025-09-12T05:33:02.194Z","repository":{"id":57267166,"uuid":"135787031","full_name":"HelpfulScripts/hsDatab","owner":"HelpfulScripts","description":"Simple Javascript-based table data management. See","archived":false,"fork":false,"pushed_at":"2020-12-31T22:12:38.000Z","size":3453,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-18T09:41:07.673Z","etag":null,"topics":["database","es6","hsdocs","typescript"],"latest_commit_sha":null,"homepage":"https://helpfulscripts.github.io/hsDatab/#!/api/hsDatab/0","language":"TypeScript","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/HelpfulScripts.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":"2018-06-02T04:26:17.000Z","updated_at":"2020-12-31T22:12:41.000Z","dependencies_parsed_at":"2022-08-31T22:00:27.520Z","dependency_job_id":null,"html_url":"https://github.com/HelpfulScripts/hsDatab","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelpfulScripts%2FhsDatab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelpfulScripts%2FhsDatab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelpfulScripts%2FhsDatab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelpfulScripts%2FhsDatab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HelpfulScripts","download_url":"https://codeload.github.com/HelpfulScripts/hsDatab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242714052,"owners_count":20173581,"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":["database","es6","hsdocs","typescript"],"created_at":"2024-11-16T16:20:20.056Z","updated_at":"2025-03-09T15:55:55.640Z","avatar_url":"https://github.com/HelpfulScripts.png","language":"TypeScript","readme":"hsDatab \n========\n[![NPM License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://www.npmjs.com/package/hsdatab)\n[![npm version](https://badge.fury.io/js/hsdatab.svg)](https://badge.fury.io/js/hsdatab)\n[![docs](https://img.shields.io/badge/hsDocs-hsDatab-blue.svg)](https://helpfulscripts.github.io/hsExcel/#!/api/hsDatab/0)\n[![Build Status](https://github.com/HelpfulScripts/hsDatab/workflows/CI/badge.svg)](https://github.com/HelpfulScripts/hsDatab/)\n[![codecov](https://codecov.io/gh/HelpfulScripts/hsDatab/branch/master/graph/badge.svg)](https://codecov.io/gh/HelpfulScripts/hsDatab)\n[![Known Vulnerabilities](https://snyk.io/test/github/HelpfulScripts/hsDatab/badge.svg?targetFile=package.json)](https://snyk.io/test/github/HelpfulScripts/hsDatab?targetFile=package.json)\n[![Dependencies Status](https://david-dm.org/helpfulscripts/hdatab.svg)](https://david-dm.org/helpfulscripts/hdatab)\n\nHelpful Scripts framework-independent data management functions.\n\n**hsDatab** provides a JavaScript-based data management and query mechanism.\nData is managed in a simple in-memory database that holds data in rows of columns. \nIt autodetermines the types of data held in each column, along with the \ndomain range for each column of data. \nComplex filters can be applied by defining [`Conditions`](https://helpfulscripts.github.io/hsDatab/#!/api/hsDatab/hsDatab.DataFilters) using a simple query object structure.\n\n## Installation\n`npm i hsdatab`\n\n## Data Types\nsupported [data types](https://helpfulscripts.github.io/hsDatab/#!/api/hsDatab/hsDatab.Data.Data.type) include\n- **number**: numeric values\n- **name**: nominal values, represented by arbitrary words\n- **date**: date values\n- **currency**: Currently supported: '$dd[,ddd]'\n- **percent**: 'd%'\n\n## Data Class\nThe fundamental object in this library is [`Data`](https://helpfulscripts.github.io/hsDatab/#!/api/hsDatab/hsDatab.Data.Data), \na simple row-column based database object, \nfeaturing named columns, sorting, mapping and filtering functions.\n\n## Example\nsee the [docs](https://helpfulscripts.github.io/hsDatab/#!/api/hsDatab/0) for a live example.\n\n## Usage \nThe following simple example illustrates some of the features: \n``` \n\nimport { data } from 'hsdatab';\n\n// creating the data\nconst colNames = ['Name', 'Value', 'Start', 'End'];\nconst rows = [\n   ['Harry', '100', '3/1/14', '11/20/14'], \n   ['Mary', '1500', '7/1/14',  '9/30/14'],\n   ['Peter', '400', '5/20/14', '4/30/15'],  \n   ['Jane', '700', '11/13/14', '8/15/15']\n];\n\n// creating the data object:\nconst data = new Data({colNames:colNames, rows:rows});\n\n// getting type and domain:        \u003e Column 'Value' has type Number and domain 100,1500\nconsole.log(`Column 'Value' has type '${data.colType('Value')}'and domain '${data.findDomain('Value')}'`);\n\n// querying the data\nconst query = {Name:[\"Peter\", \"Jane\"]};           // query: Name is Peter or Jane\nconst result = data.filter(query);                // returns new dataset with matching rows\nconsole.log(result.getColumn('Name').join(', ')); // \u003e Peter, Jane\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelpfulscripts%2Fhsdatab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelpfulscripts%2Fhsdatab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelpfulscripts%2Fhsdatab/lists"}