{"id":15964545,"url":"https://github.com/magicdawn/eval-string-interpolation","last_synced_at":"2026-04-03T23:05:04.404Z","repository":{"id":21529932,"uuid":"24849207","full_name":"magicdawn/eval-string-interpolation","owner":"magicdawn","description":"string interpolation with eval for node.js","archived":false,"fork":false,"pushed_at":"2017-04-08T17:00:55.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-13T17:51:36.605Z","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/magicdawn.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-10-06T14:27:07.000Z","updated_at":"2014-10-06T15:05:29.000Z","dependencies_parsed_at":"2022-07-23T07:46:20.142Z","dependency_job_id":null,"html_url":"https://github.com/magicdawn/eval-string-interpolation","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/magicdawn%2Feval-string-interpolation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Feval-string-interpolation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Feval-string-interpolation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Feval-string-interpolation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicdawn","download_url":"https://codeload.github.com/magicdawn/eval-string-interpolation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237307889,"owners_count":19288757,"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-07T17:02:17.896Z","updated_at":"2025-10-20T09:31:21.885Z","avatar_url":"https://github.com/magicdawn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#eval-string-interpolation\n\nRuby style string-interpolation for nodejs with `eval` function\n\n#Install\n\t$ npm i eval-string-interpolation --save\n\t\n#Usage\n`var inter = require('eval-string-interpolation');`\n\n`eval(inter( use_interpolation_string_here ))`\n\nExample\n```js\nvar inter = require('eval-string-interpolation');\n\nvar name = \"zhangsan\"\nvar age = 18\n\nconsole.log(eval(inter(\"name = #{name} , age = #{age}\")));\n// name = zhangsan , age = 18\n```\n\n## String#inter\nBy default,it will define the `inter` property,so example above sames to\n`console.log(eval(\"name = #{name} , age = #{age}\".inter));`\n\n\n##@ support\n`#{ @name }` -\u003e `this.name`\n\n`#{ @['content-type'] }` -\u003e `this['content-type']`\n\n\n#Other Implementations\n- [Fomatto](https://github.com/BonsaiDen/Fomatto) use {} as placeholder\n- [rssi](https://github.com/mvasilkov/rssi) \n- [string-interpolate](https://github.com/alexeyraspopov/string-interpolate)\n\nFomatto works like a formatter, rssi \u0026 string-interpolate looks like a template engine, it's not so lightweight.\n\nOr maybe you are looking for  a simple function that can process like\n```js\nsome_func(\"name = #{name} , age = #{age}\")\n```\nno way... since I can't find a way to access the `current scope`\n\n#License\nthe MIT License. Copyright 2014 `magicdawn\u003c784876393@qq.com\u003e`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicdawn%2Feval-string-interpolation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicdawn%2Feval-string-interpolation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicdawn%2Feval-string-interpolation/lists"}