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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ez-eco

v1.0.1

Published

An easy-to-use economy system based on mongoose

Downloads

13

Readme

Installation

npm i easygoose

Creating a database

const ez = require('ez-eco')

ez.createDB(StartingCoinAmount, Description) //= Creates a database (duh)
//=> "Your DB's code is *code*"
// It also prints your code in the console
// Write your code down somewhere because if you lose it you can't access your database anymore!

Database functions

const ez = require('ez-eco')

ez.getDB(Code) //= Gets your database
//=> DB class object

let database = ez.getDB(Code) //= So we can use it in the examples :>

database.delete() //= Deletes your database. Oof!
//=> undefined

database.regenerateCode() //= Regenerates your code. Oh and it doesn't tell you your new one >.<
//=> undefined

database.getUser(ID) //= Gets a user using their ID
//=> User class object

database.getUsers() //= Gets all the users in the database. Useful if you wanna make a leaderboard
//=> Array of user class objects

database.findUsersByCoins(CoinAmount) //= Gets the users with that amount of coins
//=> Array of user class objects (unless no users have that amount of coins)

database.createUser(ID) //= Creates a user
//=> undefined

User functions

// Users aren't that interesting, sorry -.-
const ez = require('ez-eco')
let database = ez.getDB(Code) //= It would be nice to get your database first

let user = database.getUser(ID) //= Here comes the user

user.delete() //= Deletes the user. Guess they've been bad ¯\_(ツ)_/¯
//=> undefined

user.setCoins(CoinAmount) //= Sets the user's coins
//=> undefined

user.changeCoins(CoinAmount) //= Changes the amount of the user's coins
//=> undefined

// See? Not as interesting