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 🙏

© 2026 – Pkg Stats / Ryan Hefner

jsoop

v0.3.3

Published

Javascript Object Oriented Programming(OOP) class library. Support node and browser

Readme

jsoop

It's designed to provide Object-oriented programming (OOP) support for javascript.

Introduction

There are many kinds of Object-oriented programming (OOP) libs for javascript, and I never think I would write one. When I try to migrate my javascript project into Node.JS, and try to hide the difference between client and server, to make it work on both client and Node.js. I found there no OOP javascript libs is design for this goal.

I like Script#'s OOP programming style, and Script# is now under Microsoft Permissive License (Ms-PL). So this is posible to migrate it. I make some change to make it work on node.js, and keep the feature that run on client side. also I want make it can co-work with Script#'s original's javascript runtime lib.

Features

  • Supports node.js
  • Supports client side
  • Work together with Script#'s javascript runtime lib

How it work

jsoop is a node.js javascript module, and it puts __typeName, __baseType, __interfaces, __modules RTTI into class type(function), so when new a class intance, it bind all base member into derived class's prototype, and so on.

All the RTTI is transparent maintained, so it's load is easy to estimate.

Samples

//namespace

var unitTest = {};

//////////////////////////////////////////////////////////////////////////////
//enum unitTest.DemoEnum
unitTest.DemoEnum = function unitTest_DemoEnum() {
    throw jsoop.errorNotImplemented();
};

unitTest.DemoEnum.prototype = {
    val1: 1,
    val2: 2,
    val3: 3
};

jsoop.registerEnum(jsoop.setTypeName(unitTest.DemoEnum, 'unitTest.DemoEnum'));


//////////////////////////////////////////////////////////////////////////////
//interface unitTest.DemoIntf
unitTest.IDemoIntf = function unitTest_IDemoIntf() {
};

unitTest.IDemoIntf.prototype = {
};

jsoop.registerInterface(jsoop.setTypeName(unitTest.IDemoIntf, 'unitTest.IDemoIntf'));

//////////////////////////////////////////////////////////////////////////////
//interface unitTest.DemoIntf2
unitTest.IDemoIntf2 = function unitTest_IDemoIntf2() {
};

unitTest.IDemoIntf2.prototype = {
};

jsoop.registerInterface(jsoop.setTypeName(unitTest.IDemoIntf2, 'unitTest.IDemoIntf2'));

//////////////////////////////////////////////////////////////////////////////
//module unitTest.DemoMod
unitTest.DemoMod = function unitTest_DemoMod() {
};

function unitTest_DemoMod$modFoo() {
    return 'unitTest.DemoMod';
}

unitTest.DemoMod.prototype = {
    modFoo: unitTest_DemoMod$modFoo
};

jsoop.registerModule(jsoop.setTypeName(unitTest.DemoMod, 'unitTest.DemoMod'));

//////////////////////////////////////////////////////////////////////////////
//module unitTest.DemoMod
unitTest.DemoMod2 = function unitTest_DemoMod2() {
};

function unitTest_DemoMod2$mod2Foo() {
    return 'unitTest.DemoMod2';
}

unitTest.DemoMod2.prototype = {
    mod2Foo: unitTest_DemoMod2$mod2Foo
};

jsoop.registerModule(jsoop.setTypeName(unitTest.DemoMod2, 'unitTest.DemoMod2'));

//////////////////////////////////////////////////////////////////////////////
//class unitTest.DemoBase
unitTest.DemoBase = function unitTest_DemoBase() {
};


function unitTest_DemoBase$foo() {
    return 'unitTest.DemoBase';
}

unitTest.DemoBase.prototype = {
    foo: unitTest_DemoBase$foo
};

jsoop.registerClass(jsoop.setTypeName(unitTest.DemoBase, 'unitTest.DemoBase'), null, [unitTest.IDemoIntf, unitTest.IDemoIntf2], [unitTest.DemoMod, unitTest.DemoMod2]);

//////////////////////////////////////////////////////////////////////////////
//class unitTest.Demo
unitTest.Demo = function unitTest_Demo() {
    jsoop.initializeBase(unitTest.Demo, this);
};


function unitTest_Demo$foo() {
    return 'unitTest.Demo';
}

function unitTest_Demo$baseFoo() {
    return jsoop.callBaseMethod(unitTest.Demo, this, "foo");
}

unitTest.Demo.prototype = {
    foo: unitTest_Demo$foo,
    baseFoo: unitTest_Demo$baseFoo
};

jsoop.registerClass(jsoop.setTypeName(unitTest.Demo, 'unitTest.Demo'), unitTest.DemoBase);

licence

Copyright 2012, Yin MingJun - email: [email protected] Dual licensed under the MIT or GPL Version 2 licenses. http://jquery.org/license