mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
Makes singleton variable name of NotificationCenter lowercase
When we require a singleton, its instance name should be named by lowercase, since it is not a class. Relates to #128
This commit is contained in:
parent
ffc55a204a
commit
3cb2e39a18
57 changed files with 262 additions and 262 deletions
|
|
@ -7,7 +7,7 @@ function (Exception) {
|
|||
"use strict";
|
||||
|
||||
function populate(obj, path) {
|
||||
path = path || "Nc.ns";
|
||||
path = path || "nc.ns";
|
||||
for(var key in obj) {
|
||||
if(!obj.hasOwnProperty(key)) continue;
|
||||
if(obj[key] === null) {
|
||||
|
|
@ -199,15 +199,15 @@ function (Exception) {
|
|||
|
||||
NotificationCenter.prototype.validate = function(topic) {
|
||||
if (topic === undefined) {
|
||||
throw new Exception("Topic not registered in Nc. See stack trace.");
|
||||
throw new Exception("Topic not registered in nc. See stack trace.");
|
||||
}
|
||||
|
||||
if (typeof topic === 'object') {
|
||||
throw new Exception("Topic bad format " + JSON.stringify(topic));
|
||||
}
|
||||
|
||||
if (topic.indexOf("Nc.ns") !== 0) {
|
||||
throw new Exception("Topic bad format, does not begin with Nc.ns. : " + topic);
|
||||
if (topic.indexOf("nc.ns") !== 0) {
|
||||
throw new Exception("Topic bad format, does not begin with nc.ns. : " + topic);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ function (Exception) {
|
|||
}
|
||||
}
|
||||
|
||||
// should be treated as a private function - use Nc.off(Array);
|
||||
// should be treated as a private function - use nc.off(Array);
|
||||
NotificationCenter.prototype.offAll = function (tokens) {
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
this.off(tokens[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue