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

nk

v0.3.2

Published

nodakwaeri (nk): A simple, yet powerful, and fully-featured cross-platform application framework for Node.js.

Downloads

112

Readme

nodakwaeri ( nk ) Donate via PayPal.com

A simple, yet powerful, and fully-featured cross-platform application framework for Node.js.

Unless you are only planning on using a few pieces of nodakwaeri and intend to use custom facilities, it's recommended that you install nodakwaeri via the nk-mvc or nk-xrm project template. There is more in-depth documentation available for nk-mvc which covers all aspects of the framework, and provides an excellent starting place for any nodakwaeri application. The nk-xrm repository may also provide more advanced resources, examples, and documentation for working with nodakwaeri as progress is made.

To install the nodakwaeri module, use npm as shown below in either terminal/shell or command prompt. Be sure to have Node.js and Git installed, with the latter's root directory in your systems environment path.

path_to_app/> npm install nk
var nk = require( 'nk' );
nk = new nk();
...

Below describes some general usage of nodakwaeri. Browsing the source will also prove to be a good way to get to know the nk toolset, as well as visiting the nodakwaeri wiki @ Github.

When one desires to check the type of a variable, consider the following snippet:

...
if( nk.type( obj ) !== 'function' )
{
    // Do what you will
} 
...

When extending objects and/or arrays, they can be of either type. Default behaviors occur when extending like types.

Objects:

var obj1 = { 'First': 1, 'Second': 2, 'Fourth': 4 };
var piece3 = { 'Third': 3 };

obj1 = nk.extend( obj1, piece3 );

for( var prop in obj1 )
{
    console.log( 'Key:' + prop + ', Value: ' + obj1[prop] + '.' );
}
/> Key: First, Value: 1.
/> Key: Second, Value: 2.
/> Key: Fourth, Value: 4.
/> Key: Third, Value: 3.
var arr1 = [ 1, 2, 4 ];
var piece3 = [ 3 ];

arr1 = nk.extend( arr1, piece3 );

for( var prop in arr1 )
{
    console.log( 'Key:' + prop + ', Value: ' + arr1[prop] + '.' );
}
/> Key: 0, Value: 1.
/> Key: 1, Value: 2.
/> Key: 2, Value: 4.
/> Key: 3, Value: 3.

Arrays with Objects (Non-default):

var arr1 = [ 1, 2, 4 };
var piece3 = { '3': 3 };

arr1 = nk.extend( arr1, piece3, false );

for( var prop in arr1 )
{
    console.log( 'Key:' + prop + ', Value: ' + obj1[prop] + '.' );
}
/> Key: 0, Value: 1.
/> Key: 1, Value: 2.
/> Key: 2, Value: 4.
/> Key: 3, Value: 3.

Extending an Object with an array works the same as the above, but has no 'non-default' behavior:

var obj1 = { 'First': 1, 'Second': 2, 'Fourth': 4 };
var piece3 = [ 3 ];

obj1 = nk.extend( obj1, piece3 );

for( var prop in obj1 )
{
    console.log( 'Key:' + prop + ', Value: ' + obj1[prop] + '.' );
}
/> Key: First, Value: 1.
/> Key: Second, Value: 2.
/> Key: Fourth, Value: 4.
/> Key: 0, Value: 3.

One of our jQuery favorites is an absolute must:

var obj1 = { 'First': 1, 'Second': 2, 'Fourth': 4 };
var piece3 = { 'Third': 3 };

obj1 = nk.extend( obj1, piece3 );

nk.each
(
    obj1,
    function( k, v )
    {
        console.log( 'Key:' + k + ', Value: ' + v + '.' );
    } 
);
/> Key: First, Value: 1.
/> Key: Second, Value: 2.
/> Key: Fourth, Value: 4.
/> Key: Third, Value: 3.

nodakwaeri also provides all of the facilities one might need to create an application. This includes:

Factory | Purpose --------|-------- Server | Defines and initialises the http server, listening for incoming client connections. Utilizes the session and router factories. Session | Creates and manages all client sessions to provide persistence for the end user. Protects against 'Session Take-over' and 'Session Injection' techniques. Provides tools to the developer for manipulating the session. Router | Detects and processes media requests from the browser and/or routes client requests to the proper controller for further processing. SCJL (Cryptography) | nodakwaeri is bootstrapped with The Stanford Javascript Crypto Library, via their BSD License. Controller | Implements the MVC design pattern. Invokes the derived controller requested. Developers define the application's controllers. Model | Implements the MVC design pattern. Provides the interface to the data integration tools and database object. Developers define the application's models. Renderer | Implements the MVC design pattern. Constructs XHTML for the response to the client, provides a fully featured scripting language for templating, and allows for shared layouts and powerful organization. Developers define the application's views. HTML | Provides tools for generating commonly used HTML5 controls in Accessible Rich Internet Applications (ARIA).

As a side note, by default nk-mvc makes uses of nodamysql (nk-mysql) as a database provider, and uses Bootstrap(which includes Normalize) and jQuery via CDN.

nodakwaeri is designed to work out of the box using a config file from the root of your application:

var nk = require( 'nk' ),
config = require( './config' ),
app = new nk( config );

app.init();
// Your application is now running...

Feel free to fork the repository and submit pull requests. Browse any of our other repositories as well MMOD @ Github.

You may also contribute by making a donation
Donate via PayPal.com

Eclipse Luna

Nodeclipse (Eclipse Marketplace, site)

Node.js