
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Provides a primitive base class for class-based inheritance for node.js, as well as code to make this available in a browser
Author: Rich Hildred forked from Jimmy Do
License: MIT
Class based inheritance in the style of BackBone in JavaScript code for Node.js.
npm install js-toolbox
Provides a primitive base class (Toolbox.Base) for class-based inheritance. Install with npm install js-toolbox --save
.
Based on code from Backbone (http://documentcloud.github.com/backbone/).
var Toolbox = require('js-toolbox').Toolbox;
var assert = require('assert');
var Animal = Toolbox.Base.extend({
constructor: function (name) {
this._name = name;
},
sayName: function () {
return('Hi, my name is ' + this._name);
}
});
var oAnimal = new Animal("Tony the Tiger");
assert(oAnimal.sayName() === 'Hi, my name is Tony the Tiger');
js-toolbox can also be used in a browser see browserTest.html.. To use it in a browser I added require and module.exports implementations that are also usable in any file included after js-toolbox. To browserify js-toolbox I needed jQuery.extend, since I had it already I added it, jQuery.proxy, jQuery.ajax and just plain jQuery dom parsing to my exports as _jQuery
. If you wanted to use jQuery.ajax on node for instance you would use var jQuery = require('js-toolbox')._jQuery;
See the file tests/index.js
Depends on:
FAQs
Provides a primitive base class for class-based inheritance for node.js, as well as code to make this available in a browser
The npm package js-toolbox receives a total of 1 weekly downloads. As such, js-toolbox popularity was classified as not popular.
We found that js-toolbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.