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

anonydb

v2.0.0

Published

This awesome database package was created by Anonydiamond

Downloads

3

Readme

Anony Database

Version 2 update!

What's new:

  • Recode (this package is totaly recoded)
  • New methods
  • Fixed errors
  • New way to create database
  • Added full type decleartions
  • Easy to code
  • Complete publication (this package was a indev package)

Installation

npm i anonydb

Example:

const Database = require('anonydb')

const db = new Database({
    name: 'mydb', //enter database name (where to save)
    location: '.' //creates database at current directory (here in package), so it's recommended to enter a full directory name like: C:\users\deskto\todo, If you wanna create database in your desired location. if you wanna create the database inside the package, you only may use '.' as location as it shown here
})
.create() //creates the database
.use() //uses the database

db.set('key', 'value') //sets value to key in database
db.set('todo', 'todo value name here')

console.log(db.get('key')) // Output: value
console.log(db.get('todo')) // Output: todo value name here
console.log(db.get('sdasdasd')) // Output: undefined

How to use methods

| Function | Uses | -----------|------- | Use() | uses the database, if you've already created a database using the create() function. Then you can use this use() function. This basically uses or access the the database. If you already have a database created. You only can use: new Database(...).use(). Don't forget to use this function otherwise you won't be able to access the database | | Create() | Creates a database, use it only when you wanna create a database, don't forget to use the use() function after the database has created. Example: new Database(...).create().use() | | Get(k) | The k is actually key. I don't think that i've to say how this works. You should know, as you may used this method in another databases. the key is parameter of value. make sure to use key as string value. If you wanna get a JSON value, you can use the JSON.parse(...) method. To set, use JSON.stringify(...), As we use in local storage | | Set(k,v) | You also should know this. You've to enter key:string at first parameter and value:string in second paramater. The second parameter type is string. If you wanna store any json file. You can use JSON.stringify(...) method, as you use in localStorage |

How this database works

  • The database basically creates folder as you code:

const db = new Database({
    name: 'DB' //this the folder name
    location: 'C:/users/todo/....' //the location of where the database should be created
})
.create()
.use()
  • After the database folder has created it uses txt file as every key value. If you name key database key as ex1 it will created ex1.txt file, inside the txt file the value will be saved. Example:

db.set('ex1', 'any value here')
db.set('ex2', JSON.stringify({
    t: 'test',
    your: 'name',
    thanks: 'for using the database'
}))
  • Now the database will save something like this:

Have a nice day~

Thank you for using this package