{"id":16485349,"url":"https://github.com/morganconrad/metalsmith-functional","last_synced_at":"2026-05-14T09:34:39.204Z","repository":{"id":71409884,"uuid":"115668992","full_name":"MorganConrad/metalsmith-functional","owner":"MorganConrad","description":null,"archived":false,"fork":false,"pushed_at":"2017-12-29T01:48:51.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T14:45:45.058Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MorganConrad.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-29T00:02:00.000Z","updated_at":"2017-12-29T00:04:32.000Z","dependencies_parsed_at":"2023-03-17T11:15:34.378Z","dependency_job_id":null,"html_url":"https://github.com/MorganConrad/metalsmith-functional","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/MorganConrad%2Fmetalsmith-functional","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorganConrad%2Fmetalsmith-functional/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorganConrad%2Fmetalsmith-functional/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MorganConrad%2Fmetalsmith-functional/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MorganConrad","download_url":"https://codeload.github.com/MorganConrad/metalsmith-functional/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241261834,"owners_count":19936046,"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-10-11T13:25:31.609Z","updated_at":"2026-05-14T09:34:39.171Z","avatar_url":"https://github.com/MorganConrad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://secure.travis-ci.org/MorganConrad/metalsmith-functional.png)](http://travis-ci.org/MorganConrad/metalsmith-functional)\n[![License](http://img.shields.io/badge/license-MIT-A31F34.svg)](https://github.com/MorganConrad/metalsmith-functional)\n[![NPM Downloads](http://img.shields.io/npm/dm/metalsmith-functional.svg)](https://www.npmjs.org/package/metalsmith-functional)\n[![Known Vulnerabilities](https://snyk.io/test/github/morganconrad/metalsmith-functional/badge.svg)](https://snyk.io/test/github/morganconrad/metalsmith-functional)\n[![Coverage Status](https://coveralls.io/repos/github/MorganConrad/metalsmith-functional/badge.svg)](https://coveralls.io/github/MorganConrad/metalsmith-functional)\n\n# metalsmith-functional\n\nInspired by [This feature request](https://github.com/segmentio/metalsmith/issues/287)\n\nMost metalsmith plugins directly modify the `files` object.  There is a growing trend towards \"functional style\" or immutable code, which **returns** a new version of the object instead of modifying it.  Until metalsmith supports this style, you can try using this plugin.\n\n```\nconst functional = require('metalsmith-functional');\n  ...\n.use(functional(fn [,options]))\n  \n```\n\n### fn - your function, of the form `fn(files, metalsmith [,callback(err, results)])`\n - return (or callback with) either an Object or an Array (see options.id)\n - if there is an err `files` will remain unchanged\n\n### options\n\n - options.retain   Do not delete existing key/value pairs in files.  (default = false)\n - options.id       if fn returns an array, which key to use for the filename is files  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorganconrad%2Fmetalsmith-functional","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorganconrad%2Fmetalsmith-functional","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorganconrad%2Fmetalsmith-functional/lists"}