Comparing version 3.3.0 to 3.3.1
12
index.js
@@ -9,7 +9,7 @@ const binding = require('./binding') | ||
exports.platform = function platform () { | ||
exports.platform = function platform() { | ||
return binding.platform | ||
} | ||
exports.arch = function arch () { | ||
exports.arch = function arch() { | ||
return binding.arch | ||
@@ -31,3 +31,3 @@ } | ||
exports.kill = function kill (pid, signal = constants.signals.SIGTERM) { | ||
exports.kill = function kill(pid, signal = constants.signals.SIGTERM) { | ||
if (typeof signal === 'string') { | ||
@@ -44,3 +44,3 @@ if (signal in constants.signals === false) { | ||
exports.endianness = function endianness () { | ||
exports.endianness = function endianness() { | ||
return binding.isLittleEndian ? 'LE' : 'BE' | ||
@@ -51,3 +51,3 @@ } | ||
exports.cpuUsage = function cpuUsage (previous) { | ||
exports.cpuUsage = function cpuUsage(previous) { | ||
const current = binding.cpuUsage() | ||
@@ -74,3 +74,3 @@ | ||
exports.setProcessTitle = function setProcessTitle (title) { | ||
exports.setProcessTitle = function setProcessTitle(title) { | ||
if (typeof title !== 'string') title = title.toString() | ||
@@ -77,0 +77,0 @@ |
module.exports = class OSError extends Error { | ||
constructor (msg, code, fn = OSError) { | ||
constructor(msg, code, fn = OSError) { | ||
super(`${code}: ${msg}`) | ||
@@ -11,13 +11,13 @@ this.code = code | ||
get name () { | ||
get name() { | ||
return 'OSError' | ||
} | ||
static UNKNOWN_SIGNAL (msg) { | ||
static UNKNOWN_SIGNAL(msg) { | ||
return new OSError(msg, 'UNKNOWN_SIGNAL', OSError.UNKNOWN_SIGNAL) | ||
} | ||
static TITLE_OVERFLOW (msg) { | ||
static TITLE_OVERFLOW(msg) { | ||
return new OSError(msg, 'TITLE_OVERFLOW', OSError.TITLE_OVERFLOW) | ||
} | ||
} |
{ | ||
"name": "bare-os", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"description": "Operating system utilities for Javascript", | ||
"exports": { | ||
".": "./index.js", | ||
".": { | ||
"types": "./index.d.ts", | ||
"default": "./index.js" | ||
}, | ||
"./package": "./package.json", | ||
@@ -13,2 +16,3 @@ "./constants": "./lib/constants.js", | ||
"index.js", | ||
"index.d.ts", | ||
"binding.c", | ||
@@ -22,3 +26,3 @@ "binding.js", | ||
"scripts": { | ||
"test": "standard && bare test.js" | ||
"test": "prettier . --check && bare test.js" | ||
}, | ||
@@ -41,4 +45,5 @@ "repository": { | ||
"cmake-bare": "^1.1.6", | ||
"standard": "^17.0.0" | ||
"prettier": "^3.4.2", | ||
"prettier-config-standard": "^7.0.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
23
150
574915
4
13