@jamilservices/namespace-helper
v1.0.0
Published
Personal namespace help module for javascript.
Downloads
2
Maintainers
Readme
@jamilservices/namespace-helper
Personal namespace help module for javascript.
Table of Contents
- Examples
- Installation ways
- Important Upgrade Notice for Version 1.0.0
- Import module
- Object Parameters
- Object Methods
- License
- Technologies
Installation ways:
- from github:
npm install --save git+https://github.com/jamilservicos/jamilservices-namespace-helper.git
yarn add git+https://github.com/jamilservicos/jamilservices-namespace-helper.git
- from npm:
npm install --save @jamilservices/namespace-helper
yarn add @jamilservices/namespace-helper
Important Upgrade Notice for Version 1.0.0
If you're updating to version 1.0.0 of @jamilservices/types-helper, please be aware of the following requirements and recommendations:
Node.js Version Requirement:
Version 1.0.0 of @jamilservices/types-helper is designed to work with Node.js versions 20.10 or higher. Ensure that your environment is running a compatible version of Node.js to avoid any compatibility issues.
Migrating from Version 0.1.2:
If you're migrating from version 0.1.2, it's crucial to carefully review and implement the necessary updates and adaptations for version 1.0.0. This version includes significant changes that may affect how you use the library.
Why Upgrade?
Upgrading to version 1.0.0 brings you the latest features, performance improvements, and bug fixes. We strongly recommend updating to enhance your application's functionality and security.
Need Help?
Should you face any challenges or have queries about transitioning to version 1.0.0, we are here to help. For further assistance or to report any issues, please visit our issues page where you can submit queries and report problems.
Your feedback is invaluable in helping us refine and enhance @jamilservices/types-helper.
Import module
require("@jamilservices/namespace-helper")();
or
const customVariableName = require("@jamilservices/namespace-helper");
customVariableName();
or
import customVariableName from "@jamilservices/namespace-helper";
customVariableName();
Object Parameters
- mut: if set to "true", it will activate the mutability of stores. default: false
require("@jamilservices/namespace-helper")({
mut: true
});
- prefix: if configured, will override the default trigger. default: ns
require("@jamilservices/namespace-helper")({
prefix: 'nameSpacePrefixExample'
});
- isolate: if set to "true", will only create a local instance, without automatically setting it to global. default: false
require("@jamilservices/namespace-helper")({
isolate: true
});
Object Methods
- deps: organize all dependencies for injection.
nameSpacePrefixExample.deps("testDepencyName", (test) => {
console.log("testDepencyName deps:", test);
});
nameSpacePrefixExample.deps("testDepencyName")("testString");
- storage: organizes all variables for global access.
nameSpacePrefixExample.storage("testGeneralName", "only one test");
console.log(nameSpacePrefixExample.storage("testGeneralName"));
- settings: organizes all settings for global access.
nameSpacePrefixExample.settings("testApiKeyFromEnv", process.env.TESTAPIKEY);
console.log(nameSpacePrefixExample.settings("testApiKeyFromEnv"));
- show: overview of all stores saved in the namespace
nameSpacePrefixExample.show();
License
Released under MIT by @jamilservicos.
- You can freely modify and reuse.
- The original license must be included with copies of this software.
- Please link back to this repo if you use a significant portion the source code.
👩💻💻 Technologies