memoryJS
memoryJS is a dependecy free, ES6 compliant JS library that implements the concept of pointers in JavaScript. And, oh yeah! It's tiny.
memory.js - 2.5kb (standard)
memory.min.js - 1.2kb (minified)
memory.secret.min.js - 2.4kb (obfuscated)
Preliminary work is done. Testing in progress. Feature Requests, Bug Reports & Contributions are welcomed. Node Package Coming Soon
Installation
Browser :
<script src="memory.js"></script>
<!-- or, use the minified version -->
<script src="memory.min.js"></script>
<!-- or, you can use a obfuscated version too -->
<script src="memory.secret.min.js"></script>Usage
Creating New Object in Memory
var ptr = memoryJS.publicMemoryObj.newobj(55); // this method returns a pointer objectGetting The Memory Address Of The Object
console.log(ptr.value());Accessing The Stored Object from Memory
console.log(ptr.pointedTo()); // output : 55
console.log(ptr.point); // output : 55
console.log(memoryJS.publicMemoryObj.valueOf(ptr.value())); // output : 55Changing The Stored Object in Memory
ptr.changeValue(96);
// or
ptr.point = 96;
// or
memoryJS.publicMemoryObj.changeValue(ptr.value(), 96);Deleting An Object From Memory
ptr.free(); // returns null object
// or
memoryJS.publicMemoryObj.free(); // returns zeroCreating Custom Pointer Object
var newptr = new Pointer("05f9"); // where 05f9 is the memory address (i.e value of the pointer)Trying to access the whole memory object
console.log(memoryJS.publicMemoryObj); // try yourself. it will not display any of the contents. Will only print the available methods.Donate
For Indian People
UPI ID: unsuitable001@ybl
For People Worldwide
Let's Connect
Hire Me
Please go to : https://unsuitable001.github.io/hire




