Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Container {
- /**
- * Store what you want
- *
- * @var {Object}
- */
- props = [];
- /**
- * Getter
- *
- * @param {String} value What you want to get
- * @returns {*} What you want to get
- */
- get(value) {
- return props[value];
- }
- /**
- * Setter
- * @param {String} key The key. After, you use this key to retrieve what is stored
- * @param {*} value The value to store
- *
- * @returns{Boolean} Returns true
- */
- set(key, value) {
- props[key] = value;
- return true;
- }
- }
- module.exports.Product = Product
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement