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

term-ng

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

term-ng - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

src/index.js

63

index.js

@@ -1,5 +0,4 @@

'use strict';
'use strict'
/*
Term-NG: Next Generation Terminal Feature Exposure/Whitelisting
Term-NG: Next Generation Terminal Feature Exposure/Whitelisting

@@ -19,3 +18,3 @@ Copyright (c) 2016 Mark Griffiths

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

@@ -28,30 +27,38 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

*/
var ref, supportsColor;
if ((ref = process.env.ITERM_SESSION_ID) != null ? ref.includes(':' || process.env.TERM_COLOR === '16m') : void 0) {
if (!(/\-color/.test(process.argv.join('')))) {
process.argv.splice(2, 0, '--color=16m');
}
var _supportsColor = require('supports-color')
var _supportsColor2 = _interopRequireDefault(_supportsColor)
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
}
}
supportsColor = require('supports-color');
if (process.env.ITERM_SESSION_ID && process.env.ITERM_SESSION_ID.includes(':') || process.env.TERM_COLOR && process.env.TERM_COLOR.includes('16m')) {
if (!/\-color/.test(process.argv.join(''))) {
process.argv.splice(2, 0, '--color=16m')
}
}
module.exports = {
color: {
basic: supportsColor.hasBasic,
level: supportsColor.level,
has256: supportsColor.level >= 2,
has16m: supportsColor.level >= 3
},
images: (process.env.TERM_IMAGES != null) && supportsColor.level >= 2,
audio: process.env.TERM_AUDIO != null,
font: {
basic: process.env.TERM_FONT != null,
enhanced: process.env.TERM_FONT === 'full'
},
termcap: {
basic: /^xterm-256/.test(process.env.TERM),
enhanced: /\+iterm3/.test(process.env.TERM)
},
software: process.env.TERM_PROGRAM || process.env.TERMKIT_HOST_APP || process.env.TERM || process.env.GULP
};
color: {
basic: _supportsColor2.default.hasBasic,
level: _supportsColor2.default.level,
has256: _supportsColor2.default.level >= 2,
has16m: _supportsColor2.default.level >= 3
},
images: process.env.TERM_IMAGES !== undefined && _supportsColor2.default.level >= 2,
audio: process.env.TERM_AUDIO !== undefined,
font: {
basic: process.env.TERM_FONT !== undefined,
enhanced: process.env.TERM_FONT === 'full'
},
termcap: {
basic: /^xterm-256/.test(process.env.TERM),
enhanced: /\+iterm3/.test(process.env.TERM)
},
software: process.env.TERM_PROGRAM || process.env.TERMKIT_HOST_APP || process.env.TERM || process.env.GULP
}
{
"name": "term-ng",
"version": "0.4.1",
"version": "0.5.0",
"description": "Terminal/$TERM feature snooping and whitelisting",
"main": "index.js",
"scripts": {
"test": "gulp test",
"test": "xo",
"colors": "scripts/colortest.pl"

@@ -36,3 +36,4 @@ },

"devDependencies": {
"@thebespokepixel/cordial": "^0.4.2"
"@thebespokepixel/cordial": "*",
"xo": "^0.12.1"
},

@@ -43,3 +44,25 @@ "dependencies": {

},
"build_number": 0
"build_number": 0,
"xo": {
"semicolon": false,
"esnext": true,
"rules": {
"prefer-const": 1,
"no-var": 0,
"key-spacing": [
0,
{
"beforeColon": false,
"afterColon": false
}
],
"new-cap": [
2,
{
"newIsCap": false,
"capIsNew": true
}
]
}
}
}
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