{"name":"oxc-resolver","version":"0.0.3","license":"MIT","_id":"oxc-resolver@0.0.3","homepage":"https://oxc-project.github.io","bugs":{"url":"https://github.com/oxc-project/oxc_resolver/issues"},"dist":{"shasum":"2f8f801a2949e2bf789076568a046ed6a4666c44","tarball":"http://registry-npm.ywwl.com/oxc-resolver/download/oxc-resolver-0.0.3.tgz","fileCount":4,"integrity":"sha512-xdgIswmz9gUYtOHA+1CIshtqOOwU9l233mDUXTAhHFtH+Ip1NcLXr+QBrAWD/nCMKDUAit/rwOAdMwLUEEpIdA==","signatures":[{"sig":"MEUCIGhIqAYS2pq9DZGnU6gEf2/akWlF+349wHbiNQeuvqrZAiEAxlzfMeyeP3egChe7O9T5f/3ogMECOE2TgBakEkqTJf8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/oxc-resolver@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15317,"size":3873,"noattachment":false,"key":"/oxc-resolver/-/oxc-resolver-0.0.3.tgz"},"main":"index.js","types":"./index.d.ts","funding":{"url":"https://github.com/sponsors/Boshen"},"gitHead":"9ea1bfa2dbb4a92a700a7e637a0fcff015627d16","_npmUser":{"name":"boshen","email":"boshenc@gmail.com"},"repository":{"url":"git+https://github.com/oxc-project/oxc_resolver.git","type":"git"},"_npmVersion":"10.2.3","description":"Oxc Resolver Node API","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"optionalDependencies":{"@oxc-resolver/binding-darwin-x64":"0.0.3","@oxc-resolver/binding-darwin-arm64":"0.0.3","@oxc-resolver/binding-linux-x64-gnu":"0.0.3","@oxc-resolver/binding-win32-x64-msvc":"0.0.3","@oxc-resolver/binding-linux-arm64-gnu":"0.0.3","@oxc-resolver/binding-win32-arm64-msvc":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/oxc-resolver_0.0.3_1702631125808_0.20604656620936823","host":"s3://npm-registry-packages"},"readme":"# Oxc Resolver Napi Binding\n\nSee\n\n* `index.d.ts` for `resolveSync` and `ResolverFactory` API.\n* [README.md](https://github.com/oxc-project/oxc-resolver?tab=readme-ov-file#oxc-resolver) for options.\n\n## API\n\n`resolve(directory, specifier)` - resolve `specifier` at an absolute path to a `directory`.\n\n### `directory`\n\nAn **absolute** path to a directory where the specifier is resolved against.\n\nFor CommonJS modules, it is the `__dirname` variable that contains the absolute path to the folder containing current module.\n\nFor ECMAScript modules, it is the value of `import.meta.url`.\n\nBehavior is undefined when given a path to a file.\n\n### `specifier`\n\nThe string passed to `require` or `import`, i.e. `require(\"specifier\")` or `import \"specifier\"`\n\n## ESM Example\n\n```javascript\nimport path from 'path';\nimport resolve, { ResolverFactory } from './index.js';\nimport assert from 'assert';\n\n// `resolve`\nassert(resolve.sync(process.cwd(), \"./index.js\").path, path.join(cwd, 'index.js'));\n\n// `ResolverFactory`\nconst resolver = new ResolverFactory();\nassert(resolver.sync(process.cwd(), \"./index.js\").path, path.join(cwd, 'index.js'));\n```\n","publish_time":1702631125950,"maintainers":[{"name":"boshen","email":"boshenc@gmail.com"}],"_cnpm_publish_time":1702631125950,"dist-tags":{"latest":"11.24.2"}}