{
  "manifest": {
    "name": "lilconfig",
    "version": "3.1.1",
    "description": "A zero-dependency alternative to cosmiconfig",
    "main": "src/index.js",
    "types": "src/index.d.ts",
    "scripts": {
      "test": "NODE_OPTIONS=--experimental-vm-modules ./node_modules/.bin/jest --coverage",
      "lint": "eslint ./src",
      "types": "tsc"
    },
    "keywords": [
      "cosmiconfig",
      "config",
      "configuration",
      "search"
    ],
    "files": [
      "src/index.*"
    ],
    "repository": {
      "type": "git",
      "url": "https://github.com/antonk52/lilconfig"
    },
    "bugs": {
      "url": "https://github.com/antonk52/lilconfig/issues"
    },
    "author": {
      "name": "antonk52"
    },
    "license": "MIT",
    "devDependencies": {
      "@types/jest": "^29.5.12",
      "@types/node": "^14.18.63",
      "cosmiconfig": "^8.3.6",
      "eslint": "^8.56.0",
      "eslint-config-prettier": "^9.1.0",
      "eslint-plugin-prettier": "^5.1.3",
      "jest": "^29.7.0",
      "prettier": "^3.2.5",
      "typescript": "^5.3.3",
      "uvu": "^0.5.6"
    },
    "funding": "https://github.com/sponsors/antonk52",
    "engines": {
      "node": ">=14"
    },
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-lilconfig-3.1.1-9d8a246fa753106cfc205fd2d77042faca56e5e3-integrity/node_modules/lilconfig/package.json",
    "readmeFilename": "readme.md",
    "readme": "# Lilconfig ⚙️\n[![npm version](https://badge.fury.io/js/lilconfig.svg)](https://badge.fury.io/js/lilconfig)\n[![install size](https://packagephobia.now.sh/badge?p=lilconfig)](https://packagephobia.now.sh/result?p=lilconfig)\n[![Coverage Status](https://coveralls.io/repos/github/antonk52/lilconfig/badge.svg)](https://coveralls.io/github/antonk52/lilconfig)\n\nA zero-dependency alternative to [cosmiconfig](https://www.npmjs.com/package/cosmiconfig) with the same API.\n\n## Installation\n\n```sh\nnpm install lilconfig\n```\n\n## Usage\n\n```js\nimport {lilconfig, lilconfigSync} from 'lilconfig';\n\n// all keys are optional\nconst options = {\n    stopDir: '/Users/you/some/dir',\n    searchPlaces: ['package.json', 'myapp.conf.js'],\n    ignoreEmptySearchPlaces: false\n}\n\nlilconfig(\n    'myapp',\n    options // optional\n).search() // Promise<LilconfigResult>\n\nlilconfigSync(\n    'myapp',\n    options // optional\n).load(pathToConfig) // LilconfigResult\n\n/**\n * LilconfigResult\n * {\n *   config: any; // your config\n *   filepath: string;\n * }\n */\n```\n\n## ESM\n\nESM configs can be loaded with **async API only**. Specifically `js` files in projects with `\"type\": \"module\"` in `package.json` or `mjs` files.\n\n## Difference to `cosmiconfig`\nLilconfig does not intend to be 100% compatible with `cosmiconfig` but tries to mimic it where possible. The key difference is **no** support for yaml files out of the box(`lilconfig` attempts to parse files with no extension as JSON instead of YAML). You can still add the support for YAML files by providing a loader, see an [example](#yaml-loader) below.\n\n### Options difference between the two.\n\n|cosmiconfig option      | lilconfig |\n|------------------------|-----------|\n|cache                   | ✅        |\n|loaders                 | ✅        |\n|ignoreEmptySearchPlaces | ✅        |\n|packageProp             | ✅        |\n|searchPlaces            | ✅        |\n|stopDir                 | ✅        |\n|transform               | ✅        |\n\n## Loaders examples\n\n### Yaml loader\n\nIf you need the YAML support you can provide your own loader\n\n```js\nimport {lilconfig} from 'lilconfig';\nimport yaml from 'yaml';\n\nfunction loadYaml(filepath, content) {\n    return yaml.parse(content);\n}\n\nconst options = {\n    loaders: {\n        '.yaml': loadYaml,\n        '.yml': loadYaml,\n        // loader for files with no extension\n        noExt: loadYaml\n    }\n};\n\nlilconfig('myapp', options)\n    .search()\n    .then(result => {\n        result // {config, filepath}\n    });\n```\n\n## Version correlation\n\n- lilconig v1 → cosmiconfig v6\n- lilconig v2 → cosmiconfig v7\n- lilconig v3 → cosmiconfig v8\n",
    "licenseText": "MIT License\n\nCopyright (c) 2022 Anton Kastritskiy\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.1.tgz#9d8a246fa753106cfc205fd2d77042faca56e5e3",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.1.tgz",
    "hash": "9d8a246fa753106cfc205fd2d77042faca56e5e3",
    "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==",
    "registry": "npm",
    "packageName": "lilconfig",
    "cacheIntegrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ== sha1-nYokb6dTEGz8IF/S13BC+spW5eM="
  },
  "registry": "npm",
  "hash": "9d8a246fa753106cfc205fd2d77042faca56e5e3"
}