Gathering detailed insights and metrics for noof
Gathering detailed insights and metrics for noof
Gathering detailed insights and metrics for noof
Gathering detailed insights and metrics for noof
noofdays
A small library for getting no of days between two dates.
noomiflow
nooflow是noomi团队开发的流程引擎
objection-keyset-pagination
Keyset pagination plugin for Objection.js. Also known as cursor pagination. Join the #NoOffset movement now!
ng-paginator-plus
A simple paginator component that improves the experience of pagination import the paginator module into your root module and make the paginator component as your child component set the noOfRecords property on the paginator component through property bin
npm install noof
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
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.
1var $n = require('noof'); 2 3// OR 4 5// when using this require, remove the "$n." prefix in all the examples below. 6require('noof/global');
1private.variable = ""; 2private.String.str = ""; 3 4protected.variable = ""; 5protected.String.str = ""; 6 7public.variable = ""; 8public.String.str = ""; 9 10 11private.method.foo = function () { /* your code goes here */ }; 12protected.method.foo = function () { /* your code goes here */ }; 13public.method.foo = function () { /* your code goes here */ }; 14 15// Specify a return type. 16// Return types are checked at runtime and will throw errors when specified type is not returned 17private.method.Boolean.isTrue = function () { /* your code goes here */ }; 18protected.method.Boolean.isTrue = function () { /* your code goes here */ }; 19public.method.Boolean.isTrue = function () { /* your code goes here */ }; 20
1public.method.foo(Number.a) = function(a) { /* your code goes here */ };
2public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
3public.method.foo(Object.a, String.b, Boolean.c) = function (a, b, c) { /* your code goes here */ };
4public.method.foo(Number.a, Array.d, Date.c) = function(a, d, c) { /* your code goes here */ };
5public.method.foo(String.a, String.b, String.c, String.d) = function(a, b, c, d) { /* your code goes here */ };
1var $n = require('noof'); 2// this will declare User in the public scope as well as the namespace scope 3$n.Namespace("NOOF", 4 $n.Public(function User (params) { 5 public.type = "User"; 6 public.first_name = ""; 7 public.last_name = ""; 8 public.method.foo(Number.a) = function(a) { /* your code goes here */ }; 9 public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ }; 10 }) 11) 12// this will only declare User in the namespace scope 13$n.Namespace("NOOF", 14 function User (params) { 15 public.type = "User"; 16 public.first_name = ""; 17 public.last_name = ""; 18 public.method.foo(Number.a) = function(a) { /* your code goes here */ }; 19 public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ }; 20 } 21)
1var $n = require('noof'); 2$n.Namespace("NOOF", 3 function User (params) { 4 public.type = "User"; 5 public.first_name = ""; 6 public.last_name = ""; 7 public.method.foo(Number.a) = function(a) { /* your code goes here */ }; 8 public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ }; 9 } 10) 11function use_namespace() { 12 var NOOF = $n.Use('NOOF'); 13 ver u = new NOOF.User(); 14} 15 16function use_namespace1() { 17 var User = $n.Use('NOOF.User'); 18 ver u = new User(); 19} 20 21function use_namespace() { 22 eval($n.Use('NOOF.User', true)); // setting the second argument to true returns a stringified version of the classes. 23 ver u = new User(); // this is useful for closure when the class needs to use a variable in the parent scope. 24}
1var $n = require('noof'); 2$n.Interface(function IClass () { 3 public.String.name; 4 public.method.foo(String.a); 5 public.method.foo(Number.a); 6 public.method.foo(a, b); 7 public.method.foo(a, b, c); 8 public.method.foo(a, d, c); 9 public.method.bar; 10})
1var $n = require('noof'); 2$n.Abstract(function Base() { 3 public.String._id = null; 4 public.Date.now = null; 5 protected.Array.vals = []; 6 7 public.method.foo(String.a) = function(a) { /* your code goes here */ }; 8 public.method.foobar = function* () { /* your code goes here */ }; 9});
1var $n = require('noof'); 2$n.Public(function User (params) { 3 public.type = "User"; 4 public.first_name = ""; 5 public.last_name = ""; 6 public.method.foo(Number.a) = function(a) { /* your code goes here */ }; 7 public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ }; 8})
1var $n = require('noof');
2$n.Public(function NewClass () {
3 public.String.name = "";
4 public.method.foo(String.a) = function(a) { /* your code goes here */ };
5 public.method.foo(Number.a) = function(a) { /* your code goes here */ };
6 public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
7 public.method.foo(Object.a, String.b, Boolean.c) = function (a, b, c) { /* your code goes here */ };
8 public.method.foo(Number.a, Array.d, Date.c) = function(a, d, c) { /* your code goes here */ };
9 public.method.foo(String.a, String.b, String.c, String.d) = function(a, b, c, d) { /* your code goes here */ };
10
11 public.method.bar = function*(a,b) { /* your code goes here */ };
12
13}).implementsInterface(IClass);
1var $n = require('noof');
2$n.Public(function NewClass () {
3 public.String.name = "Clark";
4 public.method.foo(Number.a) = function(a) { /* your code goes here */ };
5 public.method.foo(String.a, Number.b) = function(a, b) { /* your code goes here */ };
6 public.method.foo(Object.a, String.b, Boolean.c) = function (a, b, c) { /* your code goes here */ };
7 public.method.foo(Number.a, Array.d, Date.c) = function (a, d, c) { /* your code goes here */ };
8 public.method.foo(String.a, String.b, String.c, String.d) = function (a, b, c, d) { /* your code goes here */ };
9
10 public.method.bar = function*(a, b) { /* your code goes here */ }
11}).extendsFrom(Base);
1var $n = require('noof');
2$n.Public(function NewClass () {
3 public.String.name = "Clark";
4 public.method.foo(Number.a) = function (a) { /* your code goes here */ };
5 public.method.foo(String.a, Number.b) = function (a, b) { /* your code goes here */ };
6 public.method.foo(Object.a, String.b, Boolean.c) = function (a, b, c) { /* your code goes here */ };
7 public.method.foo(Number.a, Array.d, Date.c) = function (a, d, c) { /* your code goes here */ };
8 public.method.foo(String.a, String.b, String.c, String.d) = function (a, b, c, d) { /* your code goes here */ };
9
10 public.method.bar = function*(a, b) { /* your code goes here */ }
11}).extendsFrom(Base).implementsInterface(IClass);
1$ npm i --save noof
The Craydent NOOF is released under the Dual licensed under the MIT or GPL Version 2 licenses.
No vulnerabilities found.
No security vulnerabilities found.