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

linguist-js

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linguist-js - npm Package Compare versions

Comparing version 1.5.2 to 1.5.3

7

dist/index.js

@@ -46,4 +46,5 @@ "use strict";

content += data.toString();
if (onlyFirstLine && /\n/.test(content))
return content;
if (onlyFirstLine && content.includes('\n')) {
return content.split(/\r?\n/)[0];
}
}

@@ -141,3 +142,3 @@ return content;

if (firstLine.startsWith('#!')) {
const matches = Object.entries(langData).filter(([, data]) => { var _a; return (_a = data.interpreters) === null || _a === void 0 ? void 0 : _a.some(interpreter => firstLine.includes(interpreter)); });
const matches = Object.entries(langData).filter(([, data]) => { var _a; return (_a = data.interpreters) === null || _a === void 0 ? void 0 : _a.some(interpreter => firstLine.match('\\b' + interpreter + '\\b')); });
if (matches.length) {

@@ -144,0 +145,0 @@ const forcedLang = matches[0][0];

{
"name": "linguist-js",
"version": "1.5.2",
"version": "1.5.3",
"description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.",

@@ -47,6 +47,3 @@ "main": "dist/index.js",

"typescript": "~4.3.5"
},
"engines": {
"node": "^12 || ^14 || >=16"
}
}
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