{"id":19574685,"url":"https://github.com/stringparser/manifold","last_synced_at":"2026-05-15T06:36:15.831Z","repository":{"id":24074428,"uuid":"27461006","full_name":"stringparser/manifold","owner":"stringparser","description":"Map regular expressions via strings to objects","archived":false,"fork":false,"pushed_at":"2015-12-03T19:19:06.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-17T07:14:35.358Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stringparser.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":"2014-12-03T00:30:53.000Z","updated_at":"2015-04-30T15:12:11.000Z","dependencies_parsed_at":"2022-08-22T10:10:59.510Z","dependency_job_id":null,"html_url":"https://github.com/stringparser/manifold","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stringparser/manifold","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmanifold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmanifold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmanifold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmanifold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stringparser","download_url":"https://codeload.github.com/stringparser/manifold/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmanifold/sbom","scorecard":{"id":855293,"data":{"date":"2025-08-11","repo":{"name":"github.com/stringparser/manifold","commit":"36a990e32f4c4e0064a3a0e5b68aedc61fd23aa4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"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":"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":"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":"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"}},{"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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":"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"}}]},"last_synced_at":"2025-08-23T23:45:22.003Z","repository_id":24074428,"created_at":"2025-08-23T23:45:22.003Z","updated_at":"2025-08-23T23:45:22.003Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285382189,"owners_count":27162159,"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-11-20T02:00:05.334Z","response_time":54,"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-11T06:43:25.526Z","updated_at":"2025-11-20T06:04:38.056Z","avatar_url":"https://github.com/stringparser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## manifold [![NPM version][badge-version]][x-npm]\n\n[documentation](#documentation) -\n[examples](#examples) -\n[install](#install) -\n[todo](#todo) -\n[not a real horse](#why)\n\n[![build][badge-build]][x-travis]\n\n\u003ca href=\"http://en.wikipedia.org/wiki/Lie_group\"\u003e\n  \u003cimg alt=\"manifold\" height=325 src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/E8Petrie.svg/400px-E8Petrie.svg.png\"/\u003e\n\u003c/a\u003e\n\n## sample\n\n```js\nvar Manifold = require('manifold');\nvar app = new Manifold();\n\napp.set('get /user/:page(\\\\d+)', {\n  parent: 'get /user',\n  handle: function getUserPage(){};\n});\n\napp.set('get /user', {\n  picture: function getPicture(){\n    // fetch that thing\n  },\n  render: function markup(){\n    // you know, some markup\n  }\n});\n\napp.get('get /user/10'); // =\u003e\n{\n  notFound: false,\n  path: 'get /user/10',\n  url: '/user/10',\n  match: 'get /user/10',\n  params: { _: [ 'page' ], page: '10' },\n  handle: [Function: getUserPage],\n  picture: [Function: getPicture],\n  render: [Function: markup]\n}\n```\n\n## documentation\n\nThe `module.exports` a constructor\n````js\nvar Manifold = require('manifold');\n````\n\nthat takes no arguments\n\n```js\nvar manifold = new Manifold();\n```\nIn all the following `node` refers to the `object` mapping path to object.\n\n## manifold.set([path, props])\n\u003e set a path to regex mapping for an object\n\n_arguments_\n- `path` type string\n\n- `props` type function or plainObject\n - when is a function it will be assigned to the `props.handle`\n - when is a plainObject its properties is cloned and assigned to the node props\n\n_returns_ this\n\nThe path is taken as a regular expression using the  [parth](http://github.com/stringparser/parth) module, which uses the usual conventions on for path to regexp parsing. So you know... interesting things can happen.\n\n_samples_\n```js\nmanifold.set('get /user/:page(\\\\d+)', function getUserPage(){\n  // do stuff\n});\n\nmanifold.get('get /user/10');\n// =\u003e\n{\n  notFound: false,\n  path: 'get /user/10',\n  url: '/user/10',\n  match: 'get /user/10',\n  params: { _: [ 'page' ], page: '10' },\n  handle: [Function: getUserPage]\n}\n\n```\n\n## manifold.get([path, options, mod])\n\u003e get an object matching the given path, clone it if necessary\n\n_arguments_\n - `path`, optional, type string\n - `options`, optional, type object with all extra information\n - `mod`, type object. If is a:\n   - plainObject with property ref, the node found will not be cloned\n   - regular expression, are the props to skip while cloning\n\n_returns_ the object (cloned/by reference) `node` found\n\nIn addition, if the node has a parent it will inherit its properties while cloning.\n\n_sample_\n```js\nmanifold.set('get /user/:page', {\n  parent: 'get /user',\n  handle: function getUserPage(){};\n});\n\nmanifold.set('get /user', {\n  picture: function getPicture(){\n    // fetch that thing\n  },\n  render: function markup(){\n    // you know, some markup\n  }\n});\n\nmanifold.get('get /user/10'); // =\u003e\n{\n  notFound: false,\n  path: 'get /user/10',\n  url: '/user/10',\n  match: 'get /user/10',\n  params: { _: [ 'page' ], page: '10' },\n  handle: [Function: getUserPage],\n  picture: [Function: getPicture],\n  render: [Function: markup]\n}\n```\n\n## instance properties\n\n- `manifold.regex`: regexes are stored here\n- `manifold.store`: key value store with all of the nodes stored\n\n## why\n\nI Need it for the [runtime](https://github.com/stringparser/runtime) module ;)\n\nThe project name is an homage to the concept of  [manifold](http://en.wikipedia.org/wiki/Manifold). Beautiful creature of Math and Physics thought. BUT, this can't be considered the real thing. That is: this is not a manifold. I'd wish!\n\n## install\n\nWith [npm](https://npmjs.org)\n\n    npm install manifold --save\n\n### examples\nRun the [`example.js`](example.js) file.\n\n### test\n\n$ npm test\n\n```\n➜  manifold (master) ✓ npm test\nmanifold\n  sample\n    ✓ data creation should not fail\n    ✓ sample data should be random\n  parse\n    ✓ add test data\n    ✓ should parse properties when one sets them\n    ✓ should support objects for setting parsers\n  rootNode\n    ✓ add test data\n    ✓ should have properties ({ref: true})\n    ✓ should have properties ({ref: true})\n    ✓ should not have properties ({ref: true})\n    ✓ should have properties ({ref: true})\n  parent\n    ✓ add test data\n    ✓ should have children added after parent is set\n    ✓ should have the same parent by reference\n    ✓ property should not be enumerable after overwrite\n  children\n    ✓ add test data\n    ✓ should support single object as input\n    ✓ should support array as input\n    ✓ should have parent added after children were set\n    ✓ should not be enumerable after overwrite\n    ✓ should inherit from parent when\n\n\n20 passing (35ms)\n```\n\n### license\n\n[\u003cimg alt=\"LICENSE\" src=\"http://img.shields.io/npm/l/manifold.svg?style=flat-square\"/\u003e](http://opensource.org/licenses/MIT)\n\n\n[x-npm]: https://npmjs.org/package/manifold\n[x-travis]: https://travis-ci.org/stringparser/manifold/builds\n[badge-build]: http://img.shields.io/travis/stringparser/manifold/master.svg?style=flat-square\n[badge-version]: http://img.shields.io/npm/v/manifold.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fmanifold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringparser%2Fmanifold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fmanifold/lists"}