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

draba-mysql-fixtures

v0.0.2

Published

mysql fixtures for tests

Downloads

3

Readme

draba-mysql-fixtures

mysql fixtures for tests

INSTALL

node install draba-mysql-fixtures

API

fixture.getAllTableNames

fixture.getAllTableNames()
    .then(function (tableNames) {
        //tableNames is a array including all the table name in the database
    });

fixture.getTableData

fixture.getTableData(tableName)
    .then(function (data) {
        //data is a array including all the data in the table named tableName
    });

fixture.clearTable

fixture.clearTable(tableName)
    .then(function () {
        //table named tableName has been truncated and now is empty
    });

fixture.clearAll

fixture.clearAll()
    .then(function () {
        //all the table in the database have been truncated and not are all empty
    });

fixture.loadData

fixture.loadData(data)
    .then(function (data) {
        //load json object from parameter 'data', and insert data into table, the table name and data are all in the parameter 'data'
    });

//following is the format of the data

{
    tableName1:{
        rowName1:{
            columnName1:columnValue1,
            columnName2:columnValue2,
            columnName3:columnValue3
        },
        rowName2:{
            ...
        }
    },
    tableName2:{
        ...
    }
}

fixture.loadDataFromFile

fixture.laodDataFromFile(filename)
    .then(function (data) {
        //load json object from file, and insert data into table
    });

//same as loadData but from file
//the data in the file, the function will require the file and loadData