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

v8flags

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v8flags - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

.npmignore

36

index.js
const exec = require('child_process').exec;
const fs = require('fs');
const path = require('path');
// TODO: cache this to a file in the module matching the version number of v8
module.exports = function (callback) {
exec('node --v8-options', function (err, result) {
callback(err, result.match(/\s\s--(\w+)/gm).map(function (match) {
return match.substring(4);
}));
const version = process.versions.v8;
const tmpfile = path.join(__dirname, '.flags-'+version);
module.exports = function (cb) {
fs.exists(tmpfile, function (exists) {
if (exists) {
fs.readFile(tmpfile, function (err, flags) {
if (err) {
cb(err);
}
cb(null, JSON.parse(flags));
});
} else {
exec('node --v8-options', function (err, result) {
var flags = result.match(/\s\s--(\w+)/gm).map(function (match) {
return match.substring(4);
});
fs.writeFile(tmpfile, JSON.stringify(flags), { encoding:'utf8' },
function (writeErr) {
if (writeErr) {
cb(writeErr);
} else {
cb(null, flags);
}
}
);
});
}
});
};

2

package.json
{
"name": "v8flags",
"description": "List available v8 flags.",
"version": "0.1.0",
"version": "0.2.0",
"homepage": "https://github.com/tkellen/node-v8flags",

@@ -6,0 +6,0 @@ "author": {

@@ -1,2 +0,2 @@

# v8flags [![Build Status](https://secure.travis-ci.org/tkellen/node-v8flags.png?branch=master)](http://travis-ci.org/tkellen/node-v8flags)
# v8flags
> List available v8 flags.

@@ -18,1 +18,2 @@

* 2014-05-09 - v0.1.0 - initial release
* 2014-09-02 - v0.2.0 - cache flags
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