{"name":"oxc-resolver","version":"0.0.1","license":"MIT","_id":"oxc-resolver@0.0.1","homepage":"https://github.com/oxc-project/oxc#readme","bugs":{"url":"https://github.com/oxc-project/oxc/issues"},"dist":{"shasum":"96a972f3a51390668e2bf8a4072ec13a9b379fd2","tarball":"http://registry-npm.ywwl.com/oxc-resolver/download/oxc-resolver-0.0.1.tgz","fileCount":4,"integrity":"sha512-fhmFd+bN5NSHnROpUde7UriEyj8zrdQSTodqZzh1CYKBouW25YAigPzbKUFOhdtI2bYAfBAD0FuqBNFSUZHslg==","signatures":[{"sig":"MEQCID3QkYolN5XCyOfuwJ2apYxwu/E4Bx4v6VACbsHo8SUUAiBXbupqs9Ozl64B8/JYmdVc5aAYzTAbeWJfxyZK8k8YVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/oxc-resolver@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":8939,"size":1759,"noattachment":false,"key":"/oxc-resolver/-/oxc-resolver-0.0.1.tgz"},"main":"index.js","types":"./index.d.ts","funding":{"url":"https://github.com/sponsors/Boshen"},"gitHead":"c34b142042bfb45b249797a7b36f258ea5e8424c","_npmUser":{"name":"boshen","email":"boshenc@gmail.com"},"repository":{"url":"git+https://github.com/oxc-project/oxc.git","type":"git","directory":"npm/oxc-resolver"},"_npmVersion":"9.8.1","description":"Oxc Resolver Node API","directories":{},"_nodeVersion":"18.18.2","_hasShrinkwrap":false,"optionalDependencies":{"@oxc-resolver/binding-darwin-x64":"0.0.1","@oxc-resolver/binding-darwin-arm64":"0.0.1","@oxc-resolver/binding-linux-x64-gnu":"0.0.1","@oxc-resolver/binding-win32-x64-msvc":"0.0.1","@oxc-resolver/binding-linux-arm64-gnu":"0.0.1","@oxc-resolver/binding-win32-arm64-msvc":"0.0.1"},"_npmOperationalInternal":{"tmp":"tmp/oxc-resolver_0.0.1_1699604809957_0.3277244922829514","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":1699604810134,"maintainers":[{"name":"boshen","email":"boshenc@gmail.com"}],"_cnpm_publish_time":1699604810134,"dist-tags":{"latest":"11.24.2"}}