javascript-insights

1.0.9 • Public • Published

javascript-insights

Javascript Insights will try to override all Javascript pure functions and properties that it can and count their usage.

🚧 It is still under construction, more powerful features to come... 🚧

Installation

npm i javascript-insights

Usage

var javascriptInsights = require('javascript-insights');
 
javascriptInsights.setObjectName(javascriptInsights, 'javascriptInsights');
javascriptInsights.start();
 
var arr = [0];
arr.push(1);
arr.push(2);
 
var res = javascriptInsights.getInsights();
 
console.log(JSON.stringify(res, null, '\t'));
 
// the output:
//{
//        "overrider": {
//                "Array": {
//                        "push": 2
//                },
//               "javascriptInsights": {
//                        "getInsights": 1
//                },
//                "JSON": {
//                        "stringify": 1
//                }
//        }
//}
 

API

start([modules])

Accepts array of modules to override.

The default are all the existing modules in Node.js, include your required modules.

getInsights()

Returns the insights data.

setObjectName(obj, name)

Set the module name for modules that it can't decode.

Contact info

If you encounter any issues or you have any questions, you are more then welcome to contact me sidanmor@gmail.com

npm

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i javascript-insights

      Weekly Downloads

      0

      Version

      1.0.9

      License

      ISC

      Unpacked Size

      40.3 kB

      Total Files

      8

      Last publish

      Collaborators

      • sidanmor