
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
tern-outline
Advanced tools
tern-outline is a tern plugin which can be used to display the outline of a JavaScript file.
Tern Explorer View is filled with tern-outline :
Takes a sample :
var arr = ["string"];
var n1 = 10;
n1 = "";
function sum(x1, x2) {
var tmp = x1 * x2;
return tmp;
}
var n2 = arr;
If you wish to integrate the tern lint with an editor (Vim, Sublime, etc), here the JSON request to post to the tern server :
{
"query": {
"type": "outline",
"file": "b.js"
},
"files": [
{
"name": "b.js",
"text": "var arr = [\"string\"];\r\n\r\nvar n1 = 10;\r\nn1 = \"\";\r\n\r\nfunction sum(x1, x2) {\r\n\tvar tmp = x1 * x2;\r\n\treturn tmp;\r\n}\r\n\r\nvar n2 = arr;",
"type": "full"
}
]
}
and the JSON response of the tern server :
{
"outline": [
{
"name": "arr",
"type": "[string]",
"start": 4,
"end": 7
},
{
"name": "n1",
"type": "number|string",
"start": 29,
"end": 31
},
{
"name": "sum",
"type": "fn(x1: ?, x2: ?) -> number",
"start": 51,
"end": 111,
"children": [
{
"name": "tmp",
"type": "number",
"start": 80,
"end": 83
}
]
},
{
"name": "n2",
"type": "[string]",
"start": 119,
"end": 121
}
]
}
FAQs
A Tern plugin for outline.
We found that tern-outline 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.
Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.