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

aif-db

v0.0.4

Published

It is a simple and fast NoSQL database

Downloads

6

Readme

aif-db

It is a simple and fast NoSQL database

It is a simple and fast implementation for the management of the NoSQL database, based on JSON files through identifiers, basic methods, PUT, GET, REMOVE, among others, are implemented. supports encryption for data with the AES algorithm.

Installation

Download the library with npm / Yarn, from your local files.

Via NPM:

$ npm install aif-db

Via YARN:

$ yarn add aif-db

Or you can export to the browser, using one of these tools: [Browserify] (http://browserify.org/), [Webmake] (https://github.com/medikoo/modules-webmake) o [Webpack] (http://webpack.github.io/)

Use

The library can be included in your code through imports from CommonJS or ES.

ES2015 (ES6):

import * as DataBase from "aif-db";

CommonJS:

var DataBase = require("aif-db");

Construct

(*path*, *dataBaseName*, [*secret*], [*defaultTable*])

Methods

put (object, [table], [callback])

save (object, [table], [callback]) {

get (object, [table], [callback])

remove (object, [table], [callback])

Example:

var DataBase = require('aif-db');
var db = new DataBase('log', 'db');

var register1 = {
  _id: 12341,
  name: 'MartinR',
  date: '2020-03-01',
  data: 'Hello Word 1'
};
var register2 = {
  _id: 12443,
  name: 'Juan pedro',
  date: '2020-03-03',
  data: 'Hello Word 2'
}

db.put(register1, 'people', function(id, err) {
  console.log(id, err);
});
register1.name ='Panchito';
db.put(register1, 'session', function(id, err) {
  console.log(id, err);
});
db.put(register2, 'people', function(id, err) {
  console.log(id, err);
});

db.get(12341, 'people', function(rs, err, id) {
  console.log(id, rs, err);
});
db.get(12443, 'people', function(rs, err, id) {
  console.log(id, rs, err);
});
db.get(12341,'session', function(rs, err, id) {
  console.log(id, rs, err);
});

db.remove(12341, 'session', function(rs) {
  console.log(rs);
});

console.log('directorio: ', db.dir(12341, 'people'))

Example using cipher:

var DataBase = require('aif-db');
var db = new DataBase('log', 'db', '-secret-');
//everything else is equal...

Tests

$ npm test

O well

$ yarn test

build

$ npm run build

O well

$ yarn build

Security contact information

To report security vulnerabilities, use the following link: https://github.com/mygnet/aif-db/issues