Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

depseek

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depseek - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

2

package.json
{
"name": "depseek",
"version": "0.0.1",
"version": "0.1.0",
"description": "Seeks for dependency references in JS/TS code",

@@ -5,0 +5,0 @@ "type": "module",

@@ -41,3 +41,19 @@ # depseek

```
### Options
By default `depseek` extracts only `require` and `import` arguments. You can also capture bound comments.
```ts
const depsAndComments = await depseek(stream, {comments: true})
[
{ type: 'dep', value: 'node:fs', index: 17 },
{ type: 'dep', value: 'foo', index: 34 },
{ type: 'comment', value: ' @1.0.0', index: 46 }
//...
]
```
Stream buffer size set to `1000` by default. You can change the limit by passing `bufferSize`.
```ts
const deps = await depseek(stream, {bufferSize: 10000})
```
## Refs

@@ -44,0 +60,0 @@ * [browserify/module-deps](https://github.com/browserify/module-deps)

@@ -8,3 +8,7 @@ /// <reference types="node" resolution-mode="require"/>

};
export declare const depseek: (stream: Readable) => Promise<TCodeRef[]>;
type TOpts = {
comments?: boolean;
bufferSize?: number;
};
export declare const depseek: (stream: Readable, opts?: TOpts) => Promise<TCodeRef[]>;
export {};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc