{"id":19951005,"url":"https://github.com/valueof/ministruct","last_synced_at":"2025-05-03T18:33:32.050Z","repository":{"id":9574914,"uuid":"11488960","full_name":"valueof/ministruct","owner":"valueof","description":"Small lib to define strictly typed objects","archived":false,"fork":false,"pushed_at":"2014-01-06T00:59:54.000Z","size":150,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-23T11:02:19.248Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valueof.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":"2013-07-17T22:15:15.000Z","updated_at":"2019-09-09T11:51:44.000Z","dependencies_parsed_at":"2022-09-07T12:11:38.769Z","dependency_job_id":null,"html_url":"https://github.com/valueof/ministruct","commit_stats":null,"previous_names":["antonkovalyov/ministruct"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valueof%2Fministruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valueof%2Fministruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valueof%2Fministruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valueof%2Fministruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valueof","download_url":"https://codeload.github.com/valueof/ministruct/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224370096,"owners_count":17299969,"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-13T01:06:29.526Z","updated_at":"2024-11-13T01:06:29.952Z","avatar_url":"https://github.com/valueof.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ministruct\n==========\n\n[![build status](https://secure.travis-ci.org/antonkovalyov/ministruct.png)](http://travis-ci.org/antonkovalyov/ministruct)\n\nSmall library to define strictly typed objects. Example:\n\n```javascript\nvar { struct, make, type } = require(\"ministruct\");\n\nvar person = struct({\n  name:  type.string,\n  age:   type.number | type.nil,\n  nicks: type.array\n});\n\nvar bob = make(person);\nbob.name = \"Bob\";\nbob.age = 26;\nbob.nicks = [ \"bob1986\", \"sexybob\" ];\n\nconsole.log(bob.name); // Bob\n\nbob.age = null;   // OK\nbob.nicks = null; // TypeError\n```\n\n**Supported types**: nil, array, object, number, string, func, regexp.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalueof%2Fministruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalueof%2Fministruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalueof%2Fministruct/lists"}