Analyse a raw string rather than files/directories? #9
-
Hi, thanks a lot for this tool 🙂 ! From what I understand, the exported Would it be possible to expose another entry point which directly accepts a raw string as argument and returns the result instead ? There are some cases where the content is already in memory (like when fetching from APIs) so it would avoid saving it on disk and save some I/O |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
That sounds good, although it would require a lot of refactoring. I'll get to it later. |
Beta Was this translation helpful? Give feedback.
-
@lowlighter does the addition in 205c4ef cover your use case? (and does this look like the best way of doing this?) If so i'll release it as v2.3 //example//
const linguist = require('linguist-js')
linguist('filename', {fileContent: 'whatever'})
linguist(['file1', 'file2'], {fileContent: ['foo','bar']}) |
Beta Was this translation helpful? Give feedback.
@lowlighter does the addition in 205c4ef cover your use case? (and does this look like the best way of doing this?) If so i'll release it as v2.3