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

lovefield-ts

v0.8.0

Published

Lovefield-TS: a relational database in TypeScript

Downloads

385

Readme

Lovefield-TS

Build Status codecov

Lovefield Typescript port and modernization.

The port attempts to maintain API compatibility as much as possible.

How to use this library?

Documentation of how to use this library can be found here.

Expectations

Supported

  • Most of original Lovefield features (except Firebase and static schema).
  • NEW: NodeJS support: NodeJS 10+ will be supported (with memory store only).

Unsupported

  • Legacy browsers and technologies. Please assume ES6 throughout.
    • As of Apr 2020, Chrome 60+, Firefox 60+, Safari 10+, Edge are supported.
    • Currently only continuously tested on latest Chrome given resource shortage.
  • Firebase is no longer supported.
    • This project is not sponsored by Google and the developers do not have unlimited access for this project.
    • Firebase API changed and legacy Lovefield code cannot be used.
  • Static schema: it was designed for use with Closure compiler. Since the tool chain has moved to TypeScript, it makes no sense to support it.

Dist changes

  • Lovefield-TS no longer ships minified JavaScript file. Instead, it provides:
    • Clean CommonJS (dist/lovefield.js), ES Module (dist/lovefield.esm.js), and UMD (dist/lovefield.umd.js) bundles.
    • TypeScript declaration files in dist/.
  • Lovefield-TS no longer uses flags to do compile-time control. Instead, a runtime options object will be used. The interface is defined in lib/base/lovefield_options.ts. Users are supposed to define an object following that interface and set options via the new API lf.options.set().
    • By default, an options object not providing error message explanations is provided for better minify performance. If you wish to include detailed error message in your package, use or copy testing/debug_options.ts.

API changes

  • All namespaces are flattened. For example:

    • lf.Order is flattened to Order
    • lf.schema.DataStoreType is flattened to DataStoreType

    Please note, in ES6 modules, we usually do

    import * as lf from 'lovefield-ts';
    const order = lf.Order.DESC;

    In CommonJS module system used by Node.js, we usually do

    const lf = require('lovefield-ts');
    const order = lf.Order.DESC;
  • TypeScript users cannot refer column by name, use .col() API.

    const item = db.getSchema().table('Item');
    
    // Use .col() API to refer to column here.
    // TypeScript indexed property forces everything to be typed the same.
    // This is a language limit and not much Lovefield authors can do here.
    //
    // item['orderDate']  <== this will cause type errors
    // item.col('orderDate')  <== this will give perfect type checking
    return db.select().from(item).orderBy(item.col('orderDate')).exec();

Test changes

  • API tester and performance benchmarks are implemented in ES6 and removed dependencies on Closure Libraries completely. They can be found in external directory. Currently they are not part of the automated test process yet.

Directory structures

  • lib: Lovefield main library source code.
  • testing: Facility code used for testing, including mock objects and schemas.
  • tests: Tests for Lovefield main library.
  • demo: Demo applications in JavaScript, TypeScript, and Node.js.
  • docs: Documentation and guides.
  • external: External tools, API testers, and performance benchmarks.
  • scripts: Utility scripts for development and testing.
  • out: Temporary directory used to store intermediate files from the toolchain.
  • dist: Generated distribution files (CommonJS, ESM, UMD, and types).
  • coverage: Code coverage reports generated during testing.