https://github.com/dmuth/facebook-group-leaderboard
Node.js app to get leaderboards and other stats for 1 or more Facebook groups
https://github.com/dmuth/facebook-group-leaderboard
Last synced: about 1 year ago
JSON representation
Node.js app to get leaderboards and other stats for 1 or more Facebook groups
- Host: GitHub
- URL: https://github.com/dmuth/facebook-group-leaderboard
- Owner: dmuth
- Created: 2016-08-13T05:34:05.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2020-09-03T22:22:54.000Z (almost 6 years ago)
- Last Synced: 2024-05-02T06:07:31.357Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 3.36 MB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wrappy
Callback wrapping utility
## USAGE
```javascript
var wrappy = require("wrappy")
// var wrapper = wrappy(wrapperFunction)
// make sure a cb is called only once
// See also: http://npm.im/once for this specific use case
var once = wrappy(function (cb) {
var called = false
return function () {
if (called) return
called = true
return cb.apply(this, arguments)
}
})
function printBoo () {
console.log('boo')
}
// has some rando property
printBoo.iAmBooPrinter = true
var onlyPrintOnce = once(printBoo)
onlyPrintOnce() // prints 'boo'
onlyPrintOnce() // does nothing
// random property is retained!
assert.equal(onlyPrintOnce.iAmBooPrinter, true)
```