Skip to main content
Module

x/context_finder/mod.ts>contextFinder

Search a given file for specific sections/context data, collect this and write to a new file. For Node and Deno.
Latest
function contextFinder
Re-export
import { contextFinder } from "https://deno.land/x/context_finder@v1.1.1/mod.ts";

Read the File and Write to a New One

The main function. Read a file line by line, checking if a context exists that matches the list given. If it matches then the line-reader will save the whole context block and repeat the process for reaching a new block. Every other function is abstracted.

Parameters

contextTitles: string[]

The contexts to grab matching any of these values given from the CL

fileToRead: string

The file to read with the contexts

fileToWriteTo: string

The file to write to