{"id":17472836,"url":"https://github.com/shinnn/create-symlink","last_synced_at":"2025-04-09T23:00:25.670Z","repository":{"id":65997831,"uuid":"81182180","full_name":"shinnn/create-symlink","owner":"shinnn","description":"Create a symbolic link","archived":false,"fork":false,"pushed_at":"2018-12-06T19:29:07.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-14T00:22:40.668Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.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-02-07T07:57:25.000Z","updated_at":"2024-06-19T01:37:27.984Z","dependencies_parsed_at":"2023-06-04T19:00:45.915Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/create-symlink","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"3a221a42297c519ea804af20db2a8a086be20239"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fcreate-symlink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fcreate-symlink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fcreate-symlink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fcreate-symlink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/create-symlink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974634,"owners_count":21026742,"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-18T17:38:01.280Z","updated_at":"2025-04-09T23:00:25.585Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# create-symlink\n\n[![npm version](https://img.shields.io/npm/v/create-symlink.svg)](https://www.npmjs.com/package/create-symlink)\n[![Build Status](https://travis-ci.com/shinnn/create-symlink.svg?branch=master)](https://travis-ci.com/shinnn/create-symlink)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/create-symlink.svg)](https://coveralls.io/github/shinnn/create-symlink?branch=master)\n\nA [Node.js](https://nodejs.org/) module to [create a symbolic link](http://man7.org/linux/man-pages/man2/symlink.2.html)\n\n```javascript\nconst createSymlink = require('create-symlink');\nconst {realpath} = require('fs').promises;\n\n(async () =\u003e {\n  await createSymlink('/where/file/exists', 'where/to/create/symlink');\n  await realpath('where/to/create/symlink'); //=\u003e '/where/file/exists'\n})();\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install create-symlink\n```\n\n## API\n\n```javascript\nconst createSymlink = require('create-symlink');\n```\n\n### createSymlink(*target*, *path* [, *option*])\n\n*target*: `string` (symlink target)  \n*path*: `string` (a path where you create a symlink)  \n*option*: `Object`  \nReturn: [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n\nAlmost the same as the built-in [`fs.promises.symlink()`](https://nodejs.org/api/fs.html#fs_fspromises_symlink_target_path_type), but the third parameter receives an object with `type` property, instead of receiving a string directly.\n\n```javascript\n(async () =\u003e {\n  await createSymlink('src', 'dest', {type: 'junction'});\n  // Created a junction point (Windows only)\n})();\n```\n\n## License\n\n[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fcreate-symlink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fcreate-symlink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fcreate-symlink/lists"}