Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
cjsbaseclass
Advanced tools
DRY Javascript Class with inheritance, with embedded jQuery 2.2.3.
bower install cjsbaseclass --save
goto root package folder
copy dist\*.sublime-snippet "%APPDATA%\Sublime Text 3\Packages\User\base_js_main_class.sublime-snippet"
// Waits another class (CjsBaseClass based) on ready and call a callback
self.waitReady('TOther', self.otherClassReady.apply());
// Waits another class (CjsBaseClass based) on start and call a callback
self.waitStarted('TOther', self.otherClassStarted.apply());
// Fire a jQuery trigger
self.trigger('fire-trigger', { 'name': 'The Name', 'id': 123456 });
// Waits a trigger fire with trigger_name param, if this already fired, callback is called immediately
self.waitTrigger
(
'fire-trigger',
function(p_args)
{
console.log(p_args);
}
);
// Returns browser name
self.log.info(self.browser); // Returns 'chrome' or 'firefox' or 'safari' or 'ie' or 'other'
// Returns in case browser (ex: chrome)
self.is.chrome; // returns true
self.is.firefox; // returns false
self.is.safari; // returns false
self.is.ie; // returns false
self.is.ie9; // returns false
// Returns is browser defined
// options: self.is.chrome, self.is.firefox, self.is.safari, self.is.ie, self.is.ie9
var myvar = (self.is.ie9) ? 'IS IE9 :(' : 'IS NOT IE9 :D';
// Log to console - only if a debug is true
self.log.print('my chinese variable :P');
// Log to console with alert icon
self.log.alert('Class TOther is ready!');
// Log to console with info icon
self.log.info(self.browser);
// Log to console with error icon
self.log.danger(self.browser);
// Add dynamic locker variable
self.lock('scroll');
self.lock('scroll,slide');
// Return if dynamic variable is locked
self.isLocked('scroll'); // true
self.islocked('scroll,slide'); // true
self.isLocked('another'); // false
self.islocked('scroll,another'); // false
// Remove dynamic locker variable
self.unlock('scroll');
self.unlock('scroll,slide');
// Enable/disble debug mode
self.setDebug(true); // Debug mode on: print logs on console
self.setDebug(false); // Debug mode off: self.log.print does not print console logs
// Set debug mode
self.setDebugMode(0); // debug is false, none on console log is printed
self.setDebugMode(1); // debug is true, console log is printed
self.setDebugMode(2); // debug is true, console log is printed (developer's log include)
var MyApplication = MyApplication || {};
MyApplication.TMyClass = function($, objname, options)
{
'use strict';
var self = this;
this.init = function()
{
self.initVars();
self.processTriggers();
self.onElementsEvents();
};
this.initVars = function()
{
};
this.onReady = function()
{
// CODE ON APLICATION IS READY
// TRIGGER ONREADY IS ALREADY FIRED
self.start();
};
this.start = function()
{
// CODE ON APLICATION IS STARTED
self.triggerStarted();
};
this.processTriggers = function()
{
};
this.onElementsEvents = function()
{
};
CjsBaseClass.call(this, $, objname, options);
this.init();
};
MyApplication.MyClass = new MyApplication.TMyClass
(
window.cjsbaseclass_jquery,
'MyClass',
{
'debug': 1,
'highlighted': false
}
);
FAQs
Base Development Javascript Class
The npm package cjsbaseclass receives a total of 3 weekly downloads. As such, cjsbaseclass popularity was classified as not popular.
We found that cjsbaseclass 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.