Socket
Socket
Sign inDemoInstall

better-sqlite3

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-sqlite3 - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

23

lib/database.js

@@ -14,8 +14,3 @@ 'use strict';

}
var filename = filenameGiven.trim();
if (typeof options !== 'object' || options === null) {
options = {};
}
if (!filename) {

@@ -31,3 +26,9 @@ throw new TypeError('A database filename cannot be an empty string.');

if (options.memory) {
if (typeof options !== 'object' || options === null) {
options = {};
}
var memory = getBoolean(options, 'memory');
var readonly = getBoolean(options, 'readonly');
if (memory) {
if (process.platform === 'win32') {

@@ -46,3 +47,3 @@ filename = filename.replace(/\\/g, '/').replace(/^[a-z]:\//i, '/$&');

return new CPPDatabase(filename, filenameGiven, !!options.memory, !!options.readonly);
return new CPPDatabase(filename, filenameGiven, memory, readonly);
}

@@ -63,5 +64,5 @@

var defaultSafeIntegers = !('safeIntegers' in options);
var deterministic = getOption(options, 'deterministic');
var safeIntegers = getOption(options, 'safeIntegers');
var varargs = getOption(options, 'varargs');
var deterministic = getBoolean(options, 'deterministic');
var safeIntegers = getBoolean(options, 'safeIntegers');
var varargs = getBoolean(options, 'varargs');
var argCount = func.length;

@@ -82,3 +83,3 @@ if (typeof name !== 'string') {

function getOption(options, key) {
function getBoolean(options, key) {
if (key in options && typeof options[key] !== 'boolean') {

@@ -85,0 +86,0 @@ throw new TypeError('Expected the "' + key + '" option to be a boolean.');

{
"name": "better-sqlite3",
"version": "2.3.1",
"version": "2.3.2",
"description": "The fastest and simplest library for SQLite3 in Node.js.",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/JoshuaWise/better-sqlite3",

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