{"id":28754212,"url":"https://github.com/zeroasterisk/meteor-simple-schema-transform","last_synced_at":"2025-10-12T15:35:36.101Z","repository":{"id":57295887,"uuid":"58156979","full_name":"zeroasterisk/meteor-simple-schema-transform","owner":"zeroasterisk","description":"Transform Meteor SimpleSchema objects into various other formats/functions","archived":false,"fork":false,"pushed_at":"2016-05-12T13:14:49.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-04T05:28:55.028Z","etag":null,"topics":[],"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/zeroasterisk.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":"2016-05-05T19:57:56.000Z","updated_at":"2016-11-27T23:17:45.000Z","dependencies_parsed_at":"2022-08-30T22:30:33.807Z","dependency_job_id":null,"html_url":"https://github.com/zeroasterisk/meteor-simple-schema-transform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zeroasterisk/meteor-simple-schema-transform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fmeteor-simple-schema-transform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fmeteor-simple-schema-transform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fmeteor-simple-schema-transform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fmeteor-simple-schema-transform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeroasterisk","download_url":"https://codeload.github.com/zeroasterisk/meteor-simple-schema-transform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fmeteor-simple-schema-transform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011849,"owners_count":26085004,"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-10-12T02:00:06.719Z","response_time":53,"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":"2025-06-17T01:07:55.140Z","updated_at":"2025-10-12T15:35:36.077Z","avatar_url":"https://github.com/zeroasterisk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meteor-simple-schema-transform\n\nTransform\n[Meteor SimpleSchema](https://github.com/aldeed/meteor-simple-schema)\nobjects into other `objects`\nand `functions` for use with a variety of form engines, validators, etc.\n\n# SST (SimpleSchemaTransform)\n\nA helper to turn a\n[Meteor SimpleSchema](https://github.com/aldeed/meteor-simple-schema)\ninto a variety of translations and transformations,\nfor use with any other form builder, validator, submitter, etc.\n\nThe goal is to make SimpleSchema a portable source, for other libraries.\n\n## Status\n\nThis is a very early idea project.\nTake a look at this\n[forum thread](https://forums.meteor.com/t/simple-schema-redux-form-or-yup-or-formsy-or-formal-for-react/21777)\n\nAlso checkout the excellent [uniforms](https://github.com/vazco/uniforms/) project\nfor a more complete solution for forms (though more tied to Meteor).\n\n## Install\n\n```shell\nnpm i --save meteor-simple-schema-transform\n```\n\n## Usage\n\nThere are various parts you may want to use.\nInclude only those tools you need.\n\nMissing a tool/translation? _(add it and submit a PR)_\n\n### SST.buildClean\n\nBuild SimpleSchema into a value cleanup function - clean values object based on schema\n\n```js\n// MyContainer\nimport { Meteor } from 'meteor/meteor';\nimport { createContainer } from 'meteor/react-meteor-data';\nimport { MyPage } from '../pages/MyPage';\n\nimport SST from 'meteor-simple-schema-transform';\n\nconst mySchema = new SimpleSchema({\n  name: {\n    label: \"Friendly Name\",\n    type: String,\n    min: 3,\n    max: 30,\n  }\n});\n\nconst cleaner = SST.buildClean(mySchema);\n\nexport default createContainer(({ params }) =\u003e {\n  // ....\n  saveData (data) {\n    Meteor.call('myMethod', cleaner(data), (err) =\u003e {\n      if (err) console.error('Got Error on saveData', err);\n    });\n  }\n  return {\n    saveData\n  }\n}, MyPage);\n```\n\n### SST.forReduxForm.buildValidate\n\nBuild SimpleSchema into a validate function for use with\n[ReduxForm](http://redux-form.com/)\n\n```js\n// MyContainer\nimport { Meteor } from 'meteor/meteor';\nimport { createContainer } from 'meteor/react-meteor-data';\nimport { MyPage } from '../pages/MyPage';\n\nimport SST from 'meteor-simple-schema-transform';\n\nconst mySchema = new SimpleSchema({\n  name: {\n    label: \"Friendly Name\",\n    type: String,\n    min: 3,\n    max: 30,\n  }\n});\n\nconst cleaner = SST.buildClean(mySchema);\nconst validate = SST.forReduxForm.buildValidate(mySchema);\n\nexport default createContainer(({ params }) =\u003e {\n  // ....\n  saveData (data) {\n    Meteor.call('myMethod', cleaner(data), (err) =\u003e {\n      if (err) console.error('Got Error on saveData', err);\n    });\n  }\n  return {\n    saveData,\n    validate\n  }\n}, MyPage);\n```\n\n## Roadmap\n\n- [x] Proof of concept\n- [ ] other easy schema validate variations\n- [ ] other easy schema transformations\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroasterisk%2Fmeteor-simple-schema-transform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroasterisk%2Fmeteor-simple-schema-transform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroasterisk%2Fmeteor-simple-schema-transform/lists"}