npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sqlite3-promise-query-api

v0.0.10

Published

A promise wrapper around sqlite3 with additional query and type support

Readme

sqlite3-promise-query-api

A promise wrapper around sqlite3 with additional query and type support

UNOFFICIAL!

Attention: This is only a prototype that is currently aimed at providing easy promise access to sqlite3 databases!

Getting started

Use it in a Node.js project

package.json:

{
    "name": "test-sqlite3-promise-query-api-nodejs",
    "version": "1.0.0",
    "scripts": {
        "start": "node index.js"
    },
    "dependencies": {
        "sqlite3-promise-query-api": "^0.0.1"
    }
}

index.js:

const db = require("sqlite3-promise-query-api").default

Use it in a Typescript project

package.json:

{
    "name": "test-sqlite3-promise-query-api-typescript",
    "version": "1.0.0",
    "scripts": {
        "build": "tsc",
        "start": "node dist/index.js"
    },
    "dependencies": {
        "sqlite3-promise-query-api": "^0.0.1"
    },
    "devDependencies": {
        "typescript": "^4.8.3"
    }
}

tsconfig.json:

{
    "compilerOptions": {
        "module": "CommonJS",
        "outDir": "dist",
        "moduleResolution": "Node",
        "target": "ES6"
    },
    "exclude": [
      "dist",
      "node_modules"
    ]
}

index.ts:

import db from "sqlite3-promise-query-api"
// Types can be imported too
import type { SqliteTable, SqliteView } from "sqlite3-promise-query-api"

Run:

npm run build
npm start

Testing and Linting

Testing

To run the existing tests you can run:

npm run test

Coverage

To see which parts (branches and functions) of the code are covered by the tests you can run:

npm run nyc

This does the same thing as running npm run test but tracks the test coverage.

You can see the results either in the console or by opening the created ./coverage/index.html file.

Linting and Formatting

To format and lint the source code (and automatically fix fixable problems) run:

npm run lint-fix
npm run format-fix

To only check if the source code fulfills the requirements run:

npm run lint
npm run format

Manage npm package

Preview package content

npm pack --dry-run

Update/Publish package

# Login to your npm account
npm login
# [Optional]: Commit all changes to the git repository
git add -A && git commit
# [Optional]: Increase the patch version of the package
#             which automatically creates a new commit
npm version patch
# Push the new package
npm publish

In the github repository is also a github workflow that publishes the package when pushing a new tag:

# [...]
npm version patch
# Push the changes to github
git push
# If not automatically push the created tag(s)
git push --tags
# Now the workflow should be triggered too and automatically
# publish a new version of the package to npm