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

apps-script-backend

v1.0.0

Published

Google Apps Script as a Backend. ----

Readme

Google Apps Script as a Backend.

First iteration of the library.

Features:

Google Spreadsheet ORM

Annotate your models and tables with the information about the spreadsheet information, and save/load your entities with one line of code.

import StorageService from 'apps-script-backend/src/storage/StorageService'
import Entity from 'apps-script-backend/src/storage/Entity'
import Table from 'apps-script-backend/src/storage/Table'
import { tableColumns, tableName, tableType } from 'apps-script-backend/src/storage/decorators'

@tableColumns([
    ['name'], 
    ['age', { type: Number }]
])
class CatEntity extends Entity {
    name: string
    age: number
}

@tableName('Cats')
@tableType(CatEntity)
class CatsTable extends Table<CatEntity> {
    
}

let cat = new CatEntity();
cat.name = 'Barsik';
cat.age = 10;

let storage = new StorageService('my_spreadsheet_id');
let table = new CatsTable(storage);
table.upsert(cat);

You can implement your own IStorageService to support storage other then google spreadsheets

Google Web App HTTP Router

For now, there is an action based routing

// actions/GetEchoAction.ts
import Application from 'apps-script-backend/src/Application';
import { IAction } from 'apps-script-backend/src/Router';
import { sendJson } from 'apps-script-backend/src/helpers/http';

export default <IAction> {
    process (request, app: Application) {
        const foo = request.parameter.foo;
        return { echoFoo: foo };
    }
};
// main.ts
import options from './options';
import GetEchoAction from './actions/GetEchoAction';
import Application from 'apps-script-backend/src/Application';
import Router from 'apps-script-backend/src/Router';

let app = new Application({
	secure: options.secure,
	routes: {
		'$get /echo': GetEchoAction
	},
	spreadsheetId: options.spreadsheetId,
	shouldMeaserTimings: options.shouldMeaserTimings,
	logLevel: 'warn'
});

function doPost(request) {
	return app.process('post', request);
}
function doGet(request) {
	return app.process('get', request);
}

Google Mocks

We have created some Google apps script API mocks, so that you can create and test your application even without uploading it to google scripts. See the test folder.


:copyright: 2017 MIT