updated smartenv.info
This commit is contained in:
parent
d120dd129c
commit
503f030089
7
index.js
7
index.js
@ -8,9 +8,12 @@ smartenv.items = {}; // create the items object to store items to.
|
|||||||
smartenv.makeGlobal = function () {
|
smartenv.makeGlobal = function () {
|
||||||
addToGlobal(smartenv, "smartenv"); //add object smartenv as global["smartenv"]
|
addToGlobal(smartenv, "smartenv"); //add object smartenv as global["smartenv"]
|
||||||
};
|
};
|
||||||
smartenv.info = function () {
|
smartenv.info = {};
|
||||||
|
smartenv.info.node = {};
|
||||||
|
smartenv.info.node.version = process.version;
|
||||||
|
smartenv.info.print = function () {
|
||||||
var pck = require("./package.json");
|
var pck = require("./package.json");
|
||||||
beautylog.log("node version is " + process.version + " and smartenv version is " + pck.version);
|
beautylog.log("node version is " + smartenv.info.node.version + " and smartenv version is " + pck.version);
|
||||||
beautylog.log("the smartenv module currently holds the following properties:");
|
beautylog.log("the smartenv module currently holds the following properties:");
|
||||||
console.log(Object.getOwnPropertyNames(smartenv.items).sort());
|
console.log(Object.getOwnPropertyNames(smartenv.items).sort());
|
||||||
};
|
};
|
||||||
|
5
test.js
5
test.js
@ -2,9 +2,10 @@
|
|||||||
var smartenv = require("./index.js");
|
var smartenv = require("./index.js");
|
||||||
var beautylog = require("beautylog")("os");
|
var beautylog = require("beautylog")("os");
|
||||||
beautylog.info("Now testing the smartenv module");
|
beautylog.info("Now testing the smartenv module");
|
||||||
smartenv.info();
|
smartenv.info.print();
|
||||||
|
beautylog.info("Now testing the smartenv module");
|
||||||
smartenv.register({ key1: "Peter" }, "docit");
|
smartenv.register({ key1: "Peter" }, "docit");
|
||||||
smartenv.info();
|
smartenv.info.print();
|
||||||
beautylog.log(smartenv.get("docit").key1);
|
beautylog.log(smartenv.get("docit").key1);
|
||||||
smartenv.makeGlobal();
|
smartenv.makeGlobal();
|
||||||
beautylog.log(global.smartenv.get("docit").key1);
|
beautylog.log(global.smartenv.get("docit").key1);
|
||||||
|
@ -8,9 +8,12 @@ smartenv.items = {}; // create the items object to store items to.
|
|||||||
smartenv.makeGlobal = function () {
|
smartenv.makeGlobal = function () {
|
||||||
addToGlobal(smartenv, "smartenv"); //add object smartenv as global["smartenv"]
|
addToGlobal(smartenv, "smartenv"); //add object smartenv as global["smartenv"]
|
||||||
};
|
};
|
||||||
smartenv.info = function () {
|
smartenv.info = {};
|
||||||
|
smartenv.info.node = {};
|
||||||
|
smartenv.info.node.version = process.version;
|
||||||
|
smartenv.info.print = function () {
|
||||||
var pck = require("./package.json");
|
var pck = require("./package.json");
|
||||||
beautylog.log("node version is " + process.version + " and smartenv version is " + pck.version);
|
beautylog.log("node version is " + smartenv.info.node.version + " and smartenv version is " + pck.version);
|
||||||
beautylog.log("the smartenv module currently holds the following properties:");
|
beautylog.log("the smartenv module currently holds the following properties:");
|
||||||
console.log(Object.getOwnPropertyNames(smartenv.items).sort());
|
console.log(Object.getOwnPropertyNames(smartenv.items).sort());
|
||||||
};
|
};
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3C,IAAI,WAAW,GAAG,UAAS,SAAS,EAAC,SAAS;IAC1C,MAAM,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAClC,CAAC,CAAC;AACF,IAAI,QAAQ,GAAO,EAAE,CAAC,CAAC,wBAAwB;AAC/C,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,6CAA6C;AAClE,QAAQ,CAAC,UAAU,GAAG;IAClB,WAAW,CAAC,QAAQ,EAAC,UAAU,CAAC,CAAC,CAAA,2CAA2C;AAChF,CAAC,CAAC;AAGF,QAAQ,CAAC,IAAI,GAAG;IACZ,IAAI,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACpC,SAAS,CAAC,GAAG,CAAC,kBAAkB,GAAG,OAAO,CAAC,O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E,CAAC;AACnB,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;AACxB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAC7C,QAAQ,CAAC,IAAI,CAAC,KAAK,GAAG;IAClB,IAAI,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACpC,SAAS,CAAC,GAAG,CAAC,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,2BAA2B,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3G,SAAS,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,QAAQ,CAAC,QAAQ,GAAG,UAAS,SAAS,EAAC,SAAuB;IAAvB,yBAAuB,GAAvB,uBAAuB;IAC1D,EAAE,CAAC,CAAC,SAAS,IAAI,WAAW,CAAC,CAAA,CAAC;QAC1B,SAAS,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC1C,MAAM,CAAC;IACX,CAAC;IACD,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC1C,CAAC,CAAC;AACF,QAAQ,CAAC,GAAG,GAAG,UAAS,OAAO;IAC3B,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC"}
|
@ -10,9 +10,12 @@ smartenv.makeGlobal = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
smartenv.info = function() {
|
smartenv.info = {};
|
||||||
|
smartenv.info.node = {};
|
||||||
|
smartenv.info.node.version = process.version;
|
||||||
|
smartenv.info.print = function() {
|
||||||
var pck = require("./package.json");
|
var pck = require("./package.json");
|
||||||
beautylog.log("node version is " + process.version + " and smartenv version is " + pck.version);
|
beautylog.log("node version is " + smartenv.info.node.version + " and smartenv version is " + pck.version);
|
||||||
beautylog.log("the smartenv module currently holds the following properties:");
|
beautylog.log("the smartenv module currently holds the following properties:");
|
||||||
console.log(Object.getOwnPropertyNames(smartenv.items).sort());
|
console.log(Object.getOwnPropertyNames(smartenv.items).sort());
|
||||||
};
|
};
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
var smartenv = require("./index.js");
|
var smartenv = require("./index.js");
|
||||||
var beautylog = require("beautylog")("os");
|
var beautylog = require("beautylog")("os");
|
||||||
beautylog.info("Now testing the smartenv module");
|
beautylog.info("Now testing the smartenv module");
|
||||||
smartenv.info();
|
smartenv.info.print();
|
||||||
beautylog.info("Now testing the smartenv module");
|
beautylog.info("Now testing the smartenv module");
|
||||||
smartenv.register({ key1: "Peter" }, "docit");
|
smartenv.register({ key1: "Peter" }, "docit");
|
||||||
smartenv.info();
|
smartenv.info.print();
|
||||||
beautylog.log(smartenv.get("docit").key1);
|
beautylog.log(smartenv.get("docit").key1);
|
||||||
smartenv.makeGlobal();
|
smartenv.makeGlobal();
|
||||||
beautylog.log(global.smartenv.get("docit").key1);
|
beautylog.log(global.smartenv.get("docit").key1);
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,IAAI,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACrC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAClD,QAAQ,CAAC,IAAI,EAAE,CAAC;AAChB,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAClD,QAAQ,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAC,OAAO,EAAC,EAAC,OAAO,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,EAAE,CAAC;AAChB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1C,QAAQ,CAAC,UAAU,EAAE,CAAC;AACtB,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACjD,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC"}
|
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,IAAI,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACrC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAClD,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AACtB,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAClD,QAAQ,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAC,OAAO,EAAC,EAAC,OAAO,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AACtB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1C,QAAQ,CAAC,UAAU,EAAE,CAAC;AACtB,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACjD,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC"}
|
@ -2,10 +2,10 @@
|
|||||||
var smartenv = require("./index.js");
|
var smartenv = require("./index.js");
|
||||||
var beautylog = require("beautylog")("os");
|
var beautylog = require("beautylog")("os");
|
||||||
beautylog.info("Now testing the smartenv module");
|
beautylog.info("Now testing the smartenv module");
|
||||||
smartenv.info();
|
smartenv.info.print();
|
||||||
beautylog.info("Now testing the smartenv module");
|
beautylog.info("Now testing the smartenv module");
|
||||||
smartenv.register({key1:"Peter"},"docit");
|
smartenv.register({key1:"Peter"},"docit");
|
||||||
smartenv.info();
|
smartenv.info.print();
|
||||||
beautylog.log(smartenv.get("docit").key1);
|
beautylog.log(smartenv.get("docit").key1);
|
||||||
smartenv.makeGlobal();
|
smartenv.makeGlobal();
|
||||||
beautylog.log(global.smartenv.get("docit").key1);
|
beautylog.log(global.smartenv.get("docit").key1);
|
||||||
|
Loading…
Reference in New Issue
Block a user