{"_id":"femur","_rev":"227-febc2adb924ac21aae8129cccbee8665","name":"femur","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"femur","version":"1.0.0","keywords":["function","timing","wrapper","metrics"],"author":{"url":"https://mixmax.com","name":"Trey Tacon","email":"trey@mixmax.com"},"license":"MIT","_id":"femur@1.0.0","maintainers":[{"name":"ttacon","email":"ttacon@gmail.com"}],"homepage":"https://github.com/mixmaxhq/femur#readme","bugs":{"url":"https://github.com/mixmaxhq/femur/issues"},"dist":{"shasum":"ec29c8a4088f1d1af6058718d7d10d54b2b0c0ad","tarball":"https://registry.npmjs.org/femur/-/femur-1.0.0.tgz","integrity":"sha512-HF31APobUiiNWNq+kC72+uUgmNMncbCn9fNeWjnTG5xbHrw7TEkY+dA2+ommUy7LF4w/a0h/yeyZByAcYRJTLA==","signatures":[{"sig":"MEQCIEbJTS6Q6eT5CNRQSDd8CKGfUlDLGJL9uYNvzHWtaJIdAiBMOMp4PQDbzfxbyUIjVEMCnr8pNK+Xz4ZcZLYqRYJQBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2q7GCRA9TVsSAnZWagAAuggQAJqw4yxweUQhHt8668FM\nwxqjEFhU0ZvsDmt8Wz6fcDcrdSUwMBlDRERzuOmzXurgWgR3o1Mrab4jZp3R\n/VvC5DUWU/C8bCZtKb0TYF3pDXvxfPml2/Up934WOLOISIWgu5hG29DGnks/\n0owGusLsNDb2nEc7qTEHc+GDriElGjbuS+/LQuiK5wDiiEq4uxRTeEyXkqOw\n/xpbLlbL5CS+6TZaeiYpmXramAFco3WUf+aCngKcfCSk0hkosNfbTqhg8fgt\nJjJreUk6JgrlWgsQpsP+LxsgnkefGoQzZmCMspFGUCzjawmL3ONlrcYjXJFX\nIIlh2RlGqfvItzL7ropBNVXZpDlFl5HGnINbFwARuZqw1hMVT7HfFLriz0Av\niEd1oteBfkK3UM5Axha2K2jOadj5HENwK4OPmWlER7fjTFAKTXu98sstqW7h\nIu0sK/IsjYUaz42/1bBDgAGCWQmD/sYVQLMPhw5Gilh7Q5F8KJd+2NNm5oXL\npXM+pcHWWk5j+C62VYNclATKQeB8ExsOemc11OwTl+tR5fDh8RwVipfL0kq9\ne7/rj09OHpftg4peT5PNIueakOhMGnExrKkFK5DnLBrkUEK8LaPD4JMvLIJM\nwz5trFvsuQAYtEVDqHUYV0eq1HXwi5AZKTJZ8ZZQhYx/5aPIcYTzfuZ4w4rM\nRJfm\r\n=+u7B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","_from":".","_shasum":"ec29c8a4088f1d1af6058718d7d10d54b2b0c0ad","gitHead":"a0bea73e6915be5d60f7f8fba7745392c3aed32d","scripts":{"test":"jasmine"},"_npmUser":{"name":"ttacon","email":"ttacon@gmail.com"},"repository":{"url":"git+https://github.com/mixmaxhq/femur.git","type":"git"},"_npmVersion":"2.14.12","description":"Wrap a function with a timer","directories":{},"_nodeVersion":"4.3.2","devDependencies":{"jasmine":"^2.5.2"},"_npmOperationalInternal":{"tmp":"tmp/femur-1.0.0.tgz_1476286347380_0.2484024374280125","host":"packages-16-east.internal.npmjs.com"}}},"time":{"created":"2016-10-12T15:32:28.182Z","modified":"2026-09-30T12:52:19.636Z","1.0.0":"2016-10-12T15:32:28.182Z"},"bugs":{"url":"https://github.com/mixmaxhq/femur/issues"},"author":{"url":"https://mixmax.com","name":"Trey Tacon","email":"trey@mixmax.com"},"license":"MIT","homepage":"https://github.com/mixmaxhq/femur#readme","keywords":["function","timing","wrapper","metrics"],"repository":{"url":"git+https://github.com/mixmaxhq/femur.git","type":"git"},"description":"Wrap a function with a timer","maintainers":[{"email":"mikusdominikcz@gmail.com","name":"mikusd"},{"email":"admin+mixmax-codeship-npm@mixmax.com","name":"mixmax-codeship"},{"email":"jesse@mixmax.com","name":"jessem3"},{"email":"syed.ahmed.anas@gmail.com","name":"ahmed-anas"},{"email":"jordi.salvat.i.alabart@gmail.com","name":"jsalvata"},{"email":"raphael.b.souza@hotmail.com","name":"raphaelbs"},{"email":"it-ops@mixmax.com","name":"mixmax_it"},{"email":"akashbhalla@gmail.com","name":"akashbhalla"},{"email":"jordi.nistal@gmail.com","name":"jordins"},{"email":"amina@mixmax.com","name":"aminao"},{"email":"misterpy@gmail.com","name":"misterpy"},{"email":"pialwlc@gmail.com","name":"mvpia"},{"email":"nirmal@mixmax.com","name":"its-nimo"},{"email":"alexander.k@mixmax.com","name":"kohlhofer_mixmax"},{"email":"jakub@mixmax.com","name":"jtutaj"},{"email":"pedro@mixmax.com","name":"pedro-mixmax"},{"email":"alexander.simovic@gmail.com","name":"simalexan"},{"email":"graham@mixmax.com","name":"grahammixmax"},{"email":"jpdjeredjian@gmail.com","name":"jpdjere"},{"email":"ttacon@gmail.com","name":"ttacon"}],"readme":"## femur\nfemur is used to wrap a function so as to provide an execution timer. When\nwrapping a function with femur, you provide a callback to which femur will\npass the function execution duration. As such, make sure your duration\ncallback is asynchronous.\n\n## Install\n```\n$ npm install femur --save\n```\n\n## Usage\n\n### Wrapping functions\nThe main point of femur is to be able to provide an execution duration logger\nwhen initially wrapping a function. As such, using femur is pretty simple.\n\n```js\nconst femur = require('femur');\n\nfunction durationLogger(duration) {\n  console.log(duration);\n}\n\nfunction max(a, b) {\n  return Math.max(a, b);\n}\n\n\n// Wrapping synchronous functions is simple.\nlet wrappedMax = femur.wrap(max, durationLogger);\nwrappedMax(4, 5); // returns 5 and logs the duration to the console\n\n\n// Wrapping asynchronous functions is just as easy.\nfunction asyncMax(a, b, cb) {\n  cb(Math.max(a, b));\n}\n\nlet asyncWrappedMax = femur.wrap(asyncMax, durationLogger);\n// As a note on ordering, the below will log the duration to the console first,\n// and then it will log 5 to the console.\nasyncWrappedMax(4, 5, (val) => {\n  console.log(val);\n});\n\n```\n\n\n## Release History\n*1.0.0 Initial release.\n","readmeFilename":"README.md"}