{"analyzedAt":"2022-07-08T18:40:26.395Z","collected":{"metadata":{"name":"license","scope":"unscoped","version":"1.0.3","description":"Easily generate licenses for your projects!","date":"2020-04-09T03:15:27.358Z","author":{"name":"Ovyerus","email":"iamovyerus@gmail.com","username":"ovyerus"},"publisher":{"username":"ovyerus","email":"iamovyerus@gmail.com"},"maintainers":[{"username":"ovyerus","email":"iamovyerus@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/Ovyerus/license.git"},"links":{"npm":"https://www.npmjs.com/package/license","homepage":"https://github.com/Ovyerus/license#readme","repository":"https://github.com/Ovyerus/license","bugs":"https://github.com/Ovyerus/license/issues"},"license":"MIT","dependencies":{"@ovyerus/licenses":"^6.4.4","configstore":"^5.0.1","detect-indent":"^6.0.0","fuzzy-search":"^3.2.1","git-config-path":"^2.0.0","parse-git-config":"^3.0.0","prompts":"^2.3.2","wrap-text":"^1.0.8","yargs":"^15.3.1"},"devDependencies":{"@types/configstore":"^4.0.0","@types/fuzzy-search":"^2.1.0","@types/git-config-path":"^2.0.0","@types/jest":"^25.1.4","@types/node":"^13.9.1","@types/parse-git-config":"^3.0.0","@types/prompts":"^2.0.5","@types/yargs":"^15.0.4","@typescript-eslint/eslint-plugin":"^2.24.0","@typescript-eslint/parser":"^2.24.0","eslint":"^6.8.0","eslint-config-clarity":"^0.3.3","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2","eslint-plugin-react":"^7.19.0","eslint-plugin-react-hooks":"^2.5.0","jest":"^25.1.0","markdown-magic":"^1.0.0","metro-memory-fs":"^0.58.0","prettier":"^1.19.1","ts-jest":"^25.2.1","typescript":"^3.8.3"},"releases":[{"from":"2022-06-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1},{"from":"2022-04-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1},{"from":"2022-01-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1},{"from":"2021-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1},{"from":"2020-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1}],"hasTestScript":true,"hasSelectiveFiles":true,"readme":"# license\n\n> Easily generate licenses for your projects!\n\n<!-- AUTO-GENERATED-CONTENT:START (TOC:collapse=true&collapseText=Table of Contents) -->\n<details>\n<summary>Table of Contents</summary>\n\n- [What is this?](#what-is-this)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Advanced Usage](#advanced-usage)\n  * [Name](#name)\n  * [Email](#email)\n  * [Year](#year)\n  * [Project](#project)\n  * [Default License](#default-license)\n- [API Usage](#api-usage)\n  * [Getting a license you know](#getting-a-license-you-know)\n  * [Getting a list of licenses that match a search term](#getting-a-list-of-licenses-that-match-a-search-term)\n- [API Docs](#api-docs)\n  * [getLicense(license[, replacements]) => string](#getlicenselicense-replacements--string)\n  * [findLicense(search[, osiOnly = true]) => string[]](#findlicensesearch-osionly--true--string)\n- [License](#license)\n\n</details>\n<!-- AUTO-GENERATED-CONTENT:END -->\n\n## What is this?\n\nHave you ever started a new project, and needed to add a new license to it but\ndon't know the exact wording off by heart (because who would)? You have to\nsearch for the license you want, copy its text, paste it into a new file, and\nthen check to see if there's anything like copyright information that you need\nto update.\n\nLicense is a super easy to use CLI tool for streamlining the LICENSE file\ncreation process. With a super simple but powerful CLI inspired by tools such as\n[now](https://github.com/zeit/now), setting up a license for your new project\nhas never been easier!\n\n## Usage\n\nFirst, globally install license through your package manager of choice.\n\n```sh\n$ yarn global add license\n# or\n$ npm i -g license\n```\n\nAnd then simply run `license` to generate a license.\n\n```\n$ license [license]\n```\n\nIf you don't specify a license to generate, it'll either pick from your config,\nor show an interactive prompt for you to search through.\n\nIf you don't want to install license and just want to run it once, you can use\n`npx`\n\n```sh\n$ npx license [license]\n# Or using Yarn 2.x\n$ yarn dlx license [license]\n```\n\n## Examples\n\ntodo\n\n## Advanced Usage\n\nBy default, license will try to guess your name, email, the current project, and\nthe current year to use in the license it generates. You can override these in a\nnumber of ways though.\n\n### Name\n\nBy default, license will try to get your name from your Git configuration,\n(`git config --global user.name`). If it fails to, it will fallback to using the\n`USER` environment variable, often your username in a shell.\n\nYou can override this in two ways:\n\n1. Overriding it as a one time thing by providing a `--name` option while\n   running `license` (also alised to `-n`).\n2. Overriding it permanently by using `license config --name <name>`, which will\n   add it to the global config, and will be used for any future calls to\n   `license`, unless the `--name` option above is used, in which case that will\n   take precedence.\n\n### Email\n\nBy default, license will try to get your email from your Git configuration, just\nlike it does with your name, (`git config --global user.email`), however it does\nnot have any fallback to use, so it's recommended you use either of the two\noverride methods below.\n\n1. Overriding it as a one time thing by providing an `--email` option while\n   running `license` (also aliased to `-e`).\n2. Overriding it permanently by using `license config --email <email>`, which\n   will add it to the global config, and will be used for any future calls to\n   `license`, unless the `--email` option above is used, in which case that will\n   take precedence.\n\n### Year\n\nBy default, license will use the current year (according to your system time) to\nfill in, however you can set a custom year using the `--year` option to\n`license`.\n\nIt supports a couple formats for the year:\n\n1. a plain year - `2009`\n2. a year range - `2005-2009`\n3. a list of years - `2004, 2006, 2007` - also supports ranges in it -\n   `2004, 2005-2009, 2011`\n\n### Project\n\nBy default, license will use the directory it's making the license file in as\nthe name of the project, however in case the directory's name doesn't match the\nproject name or whatever, you can override the name using the `--projectName`\noption to `license`.\n\nIf you want to change the directory the license gets generated in, without\nneeding to `cd` into it, you can supply the `--project` option (aliased to `-p`)\nwith a path to the directory instead, and it'll generate the license there.\nIt'll also change the project name set to that of the directory, unless you\nspecify the `--projectName` option above.\n\n### Default License\n\nIf you wish to be able to run `license` without having to specify the same\nlicense everytime - say you just want to use the MIT License everywhere because\nthat's your go-to. You can set what license gets generated by default with\n`license config --license <license>`, and it will procede to use that for all\nfuture calls without you need to specify MIT as the license every single time.\n\nYou can of course override this decision by specifying a license to when you\ncall `license` via the normal usage, this just changes the default empty\nbehaviour from the search prompt to auto filling a license.\n\n## API Usage\n\nYou can also use the core functionality of `license` through a simple API\n\n### Getting a license you know\n\n```js\nimport { getLicense } from \"license\";\n\n// Get license template text\nconsole.log(getLicense(\"MIT\"));\n\n// Fill out some info\nconsole.log(getLicense(\"MIT\", { author: \"Ovyerus\", year: \"2020\" }));\n```\n\n### Getting a list of licenses that match a search term\n\n```js\nimport { findLicense } from \"license\";\n\nconsole.log(findLicense(\"mi\"));\n// [ 'MIT', 'MirOS', 'Multics', 'MPL-2.0-no-copyleft-exception' ]\n\nconsole.log(findLicense(\"mit\"));\n// [ 'MIT' ] (exact match)\n\n// Showing more licenses than just OSI-approved\nconsole.log(findLicense(\"mi\", false));\n// [\n//   'CDLA-Permissive-1.0',\n//   'MIT',\n//   'MIT-0',\n//   'MIT-CMU',\n//   'MIT-advertising',\n//   'MIT-enna',\n//   'MIT-feh',\n//   'MITNFA',\n//   'MirOS',\n//   ...\n// ]\n```\n\nCombined, you can provide a powerful searching experience for a license without\nneeding your users to exactly remember the name of what they want.\n\n## API Docs\n\n### getLicense(license[, replacements]) => string\n\nGet the body text of a given license, optionally filling in any placeholder\nvalues with given values, such as author or date.\n\n**license (string)**\n\nThe name of the license to get/fill in. Must be an exact match including\ncapitalisation.\n\n**replacements (object)**\n\nA plain `key: value` object used to populate given any present placeholders in\nthe license text, where `key` is used as the placeholder's name, and `value` is\nwhat replaces the placeholder.\n\n### findLicense(search[, osiOnly = true]) => string[]\n\nGet a list of possible matching license identifiers, given a string - possibly\nuser input. If the input is an exact matchs (sans capitalisation), it'll return\nonly that as a result, to make it easier to determine if the user got the search\nright.\n\n**search (string)**\n\nThe string to search through all the identifiers for a match.\n\n**osiOnly (boolean)**\n\nDetermines whether or not to only show only OSI-approved licenses in the\nresults. Defaults to `true`.\n\n## License\n\nThis repository and the code inside it is licensed under the MIT License. Read\n[LICENSE](./LICENSE) for more information."},"npm":{"downloads":[{"from":"2022-07-07T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":89},{"from":"2022-07-01T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":431},{"from":"2022-06-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1368},{"from":"2022-04-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":3782},{"from":"2022-01-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":7736},{"from":"2021-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":12996}],"starsCount":3},"github":{"starsCount":30,"forksCount":2,"subscribersCount":2,"issues":{"count":10,"openCount":3,"distribution":{"3600":0,"10800":0,"32400":2,"97200":1,"291600":1,"874800":1,"2624400":0,"7873200":0,"23619600":2,"70858800":2,"212576400":1},"isDisabled":false},"contributors":[{"username":"buschtoens","commitsCount":1},{"username":"Yurickh","commitsCount":1},{"username":"Ovyerus","commitsCount":43},{"username":"dependabot[bot]","commitsCount":1}],"commits":[{"from":"2022-07-01T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"from":"2022-06-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"from":"2022-04-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"from":"2022-01-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"from":"2021-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1}]},"source":{"files":{"readmeSize":7344,"testsSize":10831},"linters":["editorconfig","eslint","prettier"],"coverage":0.97,"outdatedDependencies":{"yargs":{"required":"^15.3.1","stable":"17.5.1","latest":"17.5.1"},"detect-indent":{"required":"^6.0.0","stable":"7.0.0","latest":"7.0.0"},"configstore":{"required":"^5.0.1","stable":"6.0.0","latest":"6.0.0"}}}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.7454999999999999,"health":0.5,"branding":0},"popularity":{"communityInterest":41,"downloadsCount":1260.6666666666667,"downloadsAcceleration":4.341704718417047,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":0.9,"issuesDistribution":0.9}},"score":{"final":0.6186405043651358,"detail":{"quality":0.7974640807343243,"popularity":0.0841228235990132,"maintenance":0.9998808339576686}}}