
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
by Clark Inada
NOOF (Node Object Oriented Framework) module is a framework to enable object oriented practices to JavaScript. With this module, you are able define:
NOOF provides the ability to created extensions to classes and intreface implementation which are all checked on start/load as well as the ability to import namespaces to the current scope.
###**Note: A semi-colon (;) as the end of every NOOF directive is required. *Note: Checking method parameter/variable types can only be done through run time so it is still important to run unit tests to test your own code.
var $n = require('noof');
// OR
// when using this require, remove the "$n." prefix in all the examples below.
require('noof/global');
private.variable = "";
private.String.str = "";
protected.variable = "";
protected.String.str = "";
public.variable = "";
public.String.str = "";
private.method.foo = function () { /* your code goes here */ };
protected.method.foo = function () { /* your code goes here */ };
public.method.foo = function () { /* your code goes here */ };
// Specify a return type.
// Return types are checked at runtime and will throw errors when specified type is not returned
private.method.Boolean.isTrue = function () { /* your code goes here */ };
protected.method.Boolean.isTrue = function () { /* your code goes here */ };
public.method.Boolean.isTrue = function () { /* your code goes here */ };
public.method.foo(Number.a) = function(a) { /* your code goes here */ };
public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
public.method.foo(Object.a, String.b, Boolean.c) = function (a, b, c) { /* your code goes here */ };
public.method.foo(Number.a, Array.d, Date.c) = function(a, d, c) { /* your code goes here */ };
public.method.foo(String.a, String.b, String.c, String.d) = function(a, b, c, d) { /* your code goes here */ };
var $n = require('noof');
// this will declare User in the public scope as well as the namespace scope
$n.Namespace("NOOF",
$n.Public(function User (params) {
public.type = "User";
public.first_name = "";
public.last_name = "";
public.method.foo(Number.a) = function(a) { /* your code goes here */ };
public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
})
)
// this will only declare User in the namespace scope
$n.Namespace("NOOF",
function User (params) {
public.type = "User";
public.first_name = "";
public.last_name = "";
public.method.foo(Number.a) = function(a) { /* your code goes here */ };
public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
}
)
var $n = require('noof');
$n.Namespace("NOOF",
function User (params) {
public.type = "User";
public.first_name = "";
public.last_name = "";
public.method.foo(Number.a) = function(a) { /* your code goes here */ };
public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
}
)
function use_namespace() {
var NOOF = $n.Use('NOOF');
ver u = new NOOF.User();
}
function use_namespace1() {
var User = $n.Use('NOOF.User');
ver u = new User();
}
function use_namespace() {
eval($n.Use('NOOF.User', true)); // setting the second argument to true returns a stringified version of the classes.
ver u = new User(); // this is useful for closure when the class needs to use a variable in the parent scope.
}
var $n = require('noof');
$n.Interface(function IClass () {
public.String.name;
public.method.foo(String.a);
public.method.foo(Number.a);
public.method.foo(a, b);
public.method.foo(a, b, c);
public.method.foo(a, d, c);
public.method.bar;
})
var $n = require('noof');
$n.Abstract(function Base() {
public.String._id = null;
public.Date.now = null;
protected.Array.vals = [];
public.method.foo(String.a) = function(a) { /* your code goes here */ };
public.method.foobar = function* () { /* your code goes here */ };
});
var $n = require('noof');
$n.Public(function User (params) {
public.type = "User";
public.first_name = "";
public.last_name = "";
public.method.foo(Number.a) = function(a) { /* your code goes here */ };
public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
})
var $n = require('noof');
$n.Public(function NewClass () {
public.String.name = "";
public.method.foo(String.a) = function(a) { /* your code goes here */ };
public.method.foo(Number.a) = function(a) { /* your code goes here */ };
public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
public.method.foo(Object.a, String.b, Boolean.c) = function (a, b, c) { /* your code goes here */ };
public.method.foo(Number.a, Array.d, Date.c) = function(a, d, c) { /* your code goes here */ };
public.method.foo(String.a, String.b, String.c, String.d) = function(a, b, c, d) { /* your code goes here */ };
public.method.bar = function*(a,b) { /* your code goes here */ };
}).implementsInterface(IClass);
var $n = require('noof');
$n.Public(function NewClass () {
public.String.name = "Clark";
public.method.foo(Number.a) = function(a) { /* your code goes here */ };
public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
public.method.foo(Object.a, String.b, Boolean.c) = function (a, b, c) { /* your code goes here */ };
public.method.foo(Number.a, Array.d, Date.c) = function (a, d, c) { /* your code goes here */ };
public.method.foo(String.a, String.b, String.c, String.d) = function (a, b, c, d) { /* your code goes here */ };
public.method.bar = function*(a, b) { /* your code goes here */ }
}).extendsFrom(Base);
var $n = require('noof');
$n.Public(function NewClass () {
public.String.name = "Clark";
public.method.foo(Number.a) = function (a) { /* your code goes here */ };
public.method.foo(String.a, Number.b) = function (a, b) { /* your code goes here */ };
public.method.foo(Object.a, String.b, Boolean.c) = function (a, b, c) { /* your code goes here */ };
public.method.foo(Number.a, Array.d, Date.c) = function (a, d, c) { /* your code goes here */ };
public.method.foo(String.a, String.b, String.c, String.d) = function (a, b, c, d) { /* your code goes here */ };
public.method.bar = function*(a, b) { /* your code goes here */ }
}).extendsFrom(Base).implementsInterface(IClass);
$ npm i --save noof
The Craydent NOOF is released under the Dual licensed under the MIT or GPL Version 2 licenses.
FAQs
Craydent Node Object Oriented Framework
We found that noof demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.