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

smithies

v1.0.1

Published

AWS application enablers.

Readme

Smithies

Any of you boys smithies? Or if not smithies per se, otherwise trained in the metallurgical arts before fate and circumstance led you on a life of aimless wandering?

A.W. Smithies

AWS application enablers. Turns complicated Amazon Web Service API's into simple application concepts.

But how?

var smith = require("smithies"),
    config = { accessKeyId: "*", secretAccessKey: "*", region: "us-east-1" };

smith.AWS.config(config);

var bucket = new smith.s3.Bucket("bucketname", config),
    email = new smith.ses.Email(config),
    queue = new smith.sqs.Queue(config),
    exec = new smith.lambda.Executor(config);

Storage

S3 is Amazon's cloud drive. Each "drive" is called a "bucket" and has a cloud-wide unique name.

var bucket = new smith.s3.Bucket("bucket-fuckit", [config]);

The config object contains options from the AWS SDK.

bucket.create([options,] cb)

Creates a new bucket.

The optional options argument contains parameters from the AWS SDK.

bucket.erase(cb)

Deletes the bucket.

bucket.read(file, cb)

Reads a file from the S3 bucket. The contents of the file is passed to the cb as a buffer unless the Content-Type header is json-like, in which case it is automatically parsed.

bucket.write(file, content, cb)

Write an S3 file with the given content (i.e. a Buffer, Typed Array, Blob, String, or ReadableStream). The file is private and only accessible to the writer. The Content-Type is set based on a mime.lookup.

bucket.publish(file, content, cb)

Writes an S3 file with the given content. Functionality is identical to bucket.write except the file is publicly accessible (readable but not writeable) at https://s3.amazonaws.com/[bucket]/[file].

bucket.delete(file, cb)

Deletes an S3 file.

bucket.uploadPolicy(file, redirect, duration, maxSizeMB)

Creates an upload policy to facilitate a direct upload to the S3 bucket. The file will only be accessible to the creator of the policy. Use the returned structure to create an HTML form like this.

bucket.list(like, cb)

List files in the bucket that begin with like.

bucket.copy(source, dest, cb)

Copy a file already on S3.

bucket.move(source, dest, cb)

Moves a file already on S3.

Email

SES is Amazon's scalable email dispatcher. Once your owneership of an email or domain is established, you can send emails originating from that source and let Amazon handle the complications of making sure your message doesn't end up in spam.

var email = new smith.ses.Email([config]);

The config object contains options from the AWS SDK.

email.sendText(from, to, cc, bcc, subject, body, cb)

Sends an email from a verified address with a textual body.

email.sendHtml(from, to, cc, bcc, subject, html, cb)

Sends an email from a verified address with an HTML body.

email.verifyEmailAddress(email, cb)

Sends a verification email to the supplied address. Once verified, mail can be sent on behalf of this address.

email.listEmailAddresses(cb)

Lists all verified email addresses.

email.deleteEmailAddress(id, cb)

Deletes a verified email address.

email.statistics(cb)

Gets statistics on sent email. Results are like this.

smith.ses.inlineStyling(html, relativeTo, cb)

Uses Juice to inline styles in HTML content. CSS classes and external stylesheets do not work in certain email clients and websites (such as Gmail).

Queue

SQS is Amazon's scalable queue service. Queues are useful for implementing background processing at fixed or elastic scale.

var queue = new smith.ses.Queue([config]);

The config object contains options from the AWS SDK.

queue.create(name, [options,] cb)

Creates a queue with the given name. Optional AWS SDK Attribute options can be supplied.

queue.use(name, cb)

Looks up the url of the given queue name and uses this for all subsequent operations. Either create or use needs to be called before other methods can be called successfully.

queue.delete(cb)

Deletes the queue that has been created or is being used.

queue.empty(cb)

Flushes all pending messages from the queue.

queue.count(cb)

Gets an approximate number of messages in the queue.

queue.send(message, cb)

Sends a message to the queue.

queue.receive(count, cb)

Receives up to 10 messages from the queue.

queue.complete(handle, cb)

Completes the processing of a message.

queue.handle(count, cb)

Combines the receive and complete methods. Receives up to 10 messages from the queue. Each message will have a complete method to make processing easier. Unlike the top-level complete method, a callback parameter is not required.

Functions

Lambda is Amazon's function container service, a mini-environment that can provides horizontal scale to a single function. When combined with SQS, it enables elastic scale background processing.

var exec = new smith.lambda.Executor([config]);

The config object contains options from the AWS SDK.

exec.create(options, cb)

Creates a new Lambda function.

exec.update(options, cb)

Updates the code for an existing Lambda function.

exec.delete(id, cb)

Deletes a Lambda function.

exec.invoke(fn, ...args)

Invokes a Lambda function. The first argument is the function name and the remaining arguments are spread into the function.

smith.lambda.buildZip(options, cb)

Builds a Lambda deployment package from the current environment. The callback returns a Buffer containing the generated zip file.