{"id":21082322,"url":"https://github.com/olsonpm/madonna-internal-fn","last_synced_at":"2025-03-14T04:43:15.551Z","repository":{"id":80606423,"uuid":"60140012","full_name":"olsonpm/madonna-internal-fn","owner":"olsonpm","description":null,"archived":false,"fork":false,"pushed_at":"2016-08-01T18:13:23.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T23:46:18.619Z","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/olsonpm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-01T02:41:53.000Z","updated_at":"2016-06-01T02:43:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"202bf466-fa03-4b84-bfc7-cd0b55f526ed","html_url":"https://github.com/olsonpm/madonna-internal-fn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Fmadonna-internal-fn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Fmadonna-internal-fn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Fmadonna-internal-fn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Fmadonna-internal-fn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olsonpm","download_url":"https://codeload.github.com/olsonpm/madonna-internal-fn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526853,"owners_count":20305112,"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-19T20:13:41.984Z","updated_at":"2025-03-14T04:43:15.533Z","avatar_url":"https://github.com/olsonpm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Madonna Internal Fn\nInternal means this library is only meant for madonna library consumption. All\nthis library does is create a function with validated arguments.\n\n**Tested against**\n - node 0.10.0 for the (default) es5 version\n - node 6.0.0 for es6 @ `require('madonna-internal-fn/es6')`\n\n## Example\n```js\nconst madonnaFn = require('madonna-internal-function')\n  , printArg = arg =\u003e console.dir(arg);\n\nconst mfn = madonnaFn({\n  marg: { name: ['require', 'isLadenString'] }\n  , fn: printArg\n});\n\nmfn({ name: 'phil' });\n// prints\n// { name: 'phil' }\n\n// madonna-fp validation errors are thrown when invalid arguments are passed\nmfn({ name: 1 });\n// prints\n// Invalid Input: The following arguments didn't pass their criterion\n// invalid arguments and values: {\n//   \"name\": 1\n// }\n// failed criterion per argument: {\n//   \"name\": {\n//     \"flags\": [\n//       \"isLadenString\"\n//     ]\n//   }\n// }\n```\n\n## API\n`require('madonna-internal-function')`\n - Exposes a function that takes the following arguments\n   - **marg**: `require` `isLadenPlainObject`\n     - marg stands for 'madonna-fp argument'.  It is passed to madonna-fp which\n       is used to validate the arguments in calls to the returned function.\n   - **fn**: `require` `isFunction`\n     - The function which will be called after the arguments have been validated.\n - Returns a function which validates its arguments against **marg** before\n   applying them to **fn**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsonpm%2Fmadonna-internal-fn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folsonpm%2Fmadonna-internal-fn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsonpm%2Fmadonna-internal-fn/lists"}