Socket
Socket
Sign inDemoInstall

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.3.0 to 1.0.0

.travis.yml

35

index.js

@@ -1,34 +0,1 @@

const exec = require('child_process').exec;
const fs = require('fs');
const path = require('path');
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(2);
});
fs.writeFile(tmpfile, JSON.stringify(flags), { encoding:'utf8' },
function (writeErr) {
if (writeErr) {
cb(writeErr);
} else {
cb(null, flags);
}
}
);
});
}
});
};
exports.fetch = require('./fetch');
{
"name": "v8flags",
"description": "List available v8 flags.",
"version": "0.3.0",
"description": "Get available v8 flags.",
"version": "1.0.0",
"homepage": "https://github.com/tkellen/node-v8flags",

@@ -23,2 +23,6 @@ "author": {

],
"scripts": {
"install": "node fetch.js",
"test": "mocha -R spec test.js"
},
"main": "index.js",

@@ -31,3 +35,7 @@ "engines": {

"harmony flags"
]
],
"devDependencies": {
"chai": "~1.9.1",
"mocha": "~1.21.4"
}
}

@@ -1,3 +0,3 @@

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

@@ -10,5 +10,12 @@ [![NPM](https://nodei.co/npm/v8flags.png)](https://nodei.co/npm/v8flags/)

v8flags(function(err, flags) {
console.log(flags);
});
v8flags.fetch(); // [ '--use_strict',
// '--es5_readonly',
// '--es52_globals',
// '--harmony_typeof',
// '--harmony_scoping',
// '--harmony_modules',
// '--harmony_proxies',
// '--harmony_collections',
// '--harmony',
// ...
```

@@ -21,1 +28,2 @@

* 2014-09-02 - v0.3.0 - keep -- in flag names
* 2014-09-03 - v1.0.0 - first major version release

Sorry, the diff of this file is not supported yet

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