{"id":16387464,"url":"https://github.com/mastilver/module-to-cdn","last_synced_at":"2025-03-16T16:31:00.902Z","repository":{"id":19675406,"uuid":"84988187","full_name":"mastilver/module-to-cdn","owner":"mastilver","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-26T05:17:59.000Z","size":61,"stargazers_count":46,"open_issues_count":13,"forks_count":32,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T10:17:22.262Z","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/mastilver.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":"2017-03-14T19:18:58.000Z","updated_at":"2024-11-12T07:59:22.000Z","dependencies_parsed_at":"2023-01-13T20:31:09.568Z","dependency_job_id":null,"html_url":"https://github.com/mastilver/module-to-cdn","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fmodule-to-cdn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fmodule-to-cdn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fmodule-to-cdn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fmodule-to-cdn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mastilver","download_url":"https://codeload.github.com/mastilver/module-to-cdn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822283,"owners_count":20353499,"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-11T04:26:37.175Z","updated_at":"2025-03-16T16:31:00.638Z","avatar_url":"https://github.com/mastilver.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# module-to-cdn [![Build Status](https://travis-ci.org/mastilver/module-to-cdn.svg?branch=master)](https://travis-ci.org/mastilver/module-to-cdn) [![Greenkeeper badge](https://badges.greenkeeper.io/JulianWielga/module-to-cdn.svg)](https://greenkeeper.io/)\n\n\u003e Get cdn config from npm module name\n\n\n## Install\n\n```\n$ npm install --save module-to-cdn\n```\n\n\n## Usage\n\n```js\nconst moduleToCdn = require('module-to-cdn');\n\nmoduleToCdn('react', '15.3.0');\n/* =\u003e {\n    name: 'react',\n    var: 'React',\n    url: 'https://unpkg.com/react@15.3.0/dist/react.min.js',\n    version: '15.3.0'\n}\n*/\n```\n\n\n## API\n\n### moduleToCdn(moduleName, version, options)\n\nreturn the result `Object` or null (if module couldn't be find)\n\n#### moduleName\n\nType: `string`\n\nThe name of the module\n\n#### version\n\nType: `string`\n\nThe version of the module\n\n#### options\n\n##### options.env\n\nType: `string`\u003cbr\u003e\nValues: `development`, `production`\u003cbr\u003e\nDefault: `development`\n\n### Result\n\n* `name`: name of the module\n* `var`: name of the global variable exposing the module\n* `url`: url where the module is available\n* `version`: the version asked for\n\n\n## License\n\nMIT © [Thomas Sileghem](http://mastilver.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastilver%2Fmodule-to-cdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastilver%2Fmodule-to-cdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastilver%2Fmodule-to-cdn/lists"}