
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
Finds and returns information on each line of the file that matches a regular expression,

Finds and returns information on each line of the file that matches a regular expression.
Lineder finds and returns information on each line of the file that matches your search.
npm install --save linedervar lineder = require( "lineder" );
/* file.txt
1. this is the text for line one.
2. this is the text for line two.
3. this is the text for line three.
*/
lineder( "file.txt", "line two", function( err, results ) {
//=> [ { line: 2, value "this is the text for line two." } ]
});
| Name | Type | Argument | Description |
|---|---|---|---|
| path | string | <required> | the path of the file to be searched. |
| Name | Type | Argument | Description |
|---|---|---|---|
| regex | `string | regex` | <required> |
| callback | function | <required> | callback that returns the results of the search |
| Name | Type | Argument | Description |
|---|---|---|---|
| error | error | <required> | any errors that may have occured. |
| results | array | <required> | an array of objects containg the line number and values from the results of the search. |
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.
Copyright (c) 2015 Jason Bellamy
Licensed under the MIT license.
FAQs
Finds and returns information on each line of the file that matches a regular expression,
We found that lineder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.