{"id":21245304,"url":"https://github.com/jstransformers/jstransformer-reshape","last_synced_at":"2025-06-14T17:32:52.203Z","repository":{"id":57286455,"uuid":"75511253","full_name":"jstransformers/jstransformer-reshape","owner":"jstransformers","description":"Reshape support for JSTransformers.","archived":false,"fork":false,"pushed_at":"2020-05-01T08:40:20.000Z","size":68,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-18T08:48:11.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://npmjs.com/jstransformer-reshape","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/jstransformers.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-04T01:43:27.000Z","updated_at":"2020-04-26T02:57:05.000Z","dependencies_parsed_at":"2022-09-20T01:03:52.111Z","dependency_job_id":null,"html_url":"https://github.com/jstransformers/jstransformer-reshape","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jstransformers/jstransformer-reshape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstransformers%2Fjstransformer-reshape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstransformers%2Fjstransformer-reshape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstransformers%2Fjstransformer-reshape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstransformers%2Fjstransformer-reshape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jstransformers","download_url":"https://codeload.github.com/jstransformers/jstransformer-reshape/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstransformers%2Fjstransformer-reshape/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259854414,"owners_count":22922052,"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-21T01:50:19.448Z","updated_at":"2025-06-14T17:32:52.138Z","avatar_url":"https://github.com/jstransformers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jstransformer-reshape\n\n[reshape](https://reshape.ml/) support for [JSTransformers](http://github.com/jstransformers).\n\n[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-reshape/master.svg)](https://travis-ci.org/jstransformers/jstransformer-reshape)\n[![Coverage Status](https://img.shields.io/codecov/c/github/jstransformers/jstransformer-reshape/master.svg)](https://codecov.io/gh/jstransformers/jstransformer-reshape)\n[![Dependency Status](https://img.shields.io/david/jstransformers/jstransformer-reshape/master.svg)](http://david-dm.org/jstransformers/jstransformer-reshape)\n[![NPM version](https://img.shields.io/npm/v/jstransformer-reshape.svg)](https://www.npmjs.org/package/jstransformer-reshape)\n\n## Installation\n\n`npm install jstransformer-reshape`\n\n\u003e **Note:** Reshape requires node v6 or above.\n\n## API\n\n```js\nconst reshape = require('jstransformer')(require('jstransformer-reshape'))\nconst customElements = require('reshape-custom-elements')\nconst expressions = require('reshape-expressions')\n\nconst text = `\n\u003cmy-component\u003e\n  \u003cmy-text class=\"text\"\u003e{{ name }}\u003c/my-text\u003e\n\u003c/my-component\u003e\n`\n\nconst locals = {\n  name: 'caleb'\n}\n\n// pass an array of plugins\nconst options = { plugins: [customElements(), expressions()] }\n\nreshape.renderAsync(text, options).then((result) =\u003e {\n  console.log(result.body)\n})\n//=\u003e '\u003cdiv class=\"my-component\"\u003e\\n\u003cdiv class=\"text my-text\"\u003eCaleb\u003c/div\u003e\\n\u003c/div\u003e'\n\n// or pass an object of plugins and settings\nconst options2 = {\n  plugins: {\n    customElements: { defaultTag: 'span' },\n    expressions: {}\n  }\n}\n\nreshape.renderAsync(text, options2, locals).then(function (result) {\n  console.log(result.body)\n})\n//=\u003e '\u003cspan class=\"my-component\"\u003e\\n\u003cspan class=\"text my-text\"\u003eCaleb\u003c/span\u003e\\n\u003c/span\u003e'\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstransformers%2Fjstransformer-reshape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjstransformers%2Fjstransformer-reshape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstransformers%2Fjstransformer-reshape/lists"}