├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── examples ├── fibonacci.js ├── fizzbuzz.js └── nested-math.js ├── index.js ├── lib ├── add.js ├── divide.js ├── isArray.js ├── isEven.js ├── isFalse.js ├── isNumber.js ├── isObject.js ├── isOdd.js ├── isTrue.js ├── map.js ├── modulo.js ├── multiply.js ├── parseNumber.js ├── reduce.js ├── subtract.js ├── toLowerCase.js └── toUpperCase.js ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | npm-debug.log* 3 | yarn-debug.log* 4 | yarn-error.log* 5 | .npm 6 | node_modules -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | _The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/)._ 4 | 5 | ## [Unreleased] 6 | ### Added 7 | - Added `modulo` function, by [@rbong](https://github.com/rbong) 8 | - Added `FizzBuzz` example, by [@rbong](https://github.com/rbong) 9 | 10 | ### Fixed 11 | - Fixed typo in README.md, by [@Detry322](https://github.com/Detry322) 12 | 13 | ### Changed 14 | - Change `map` function to [work with callbacks](https://github.com/scf4/callbaxx/commit/ed615ba7c82c3a569a6a6ed144d03d6b2ad7b951) 15 | 16 | ## [<= 0.3.0] 17 | 18 | [See commit history](https://github.com/scf4/callbaxx/commits/master) 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 scf4 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 | 6 |
7 | 8 | In recent years, a vocal portion of the JS community has forced the usage of "ES6" (essentially an entirely new language) onto the rest of the JS community. Proponents of this new language (known as "sixers") have been given free reign to make changes nobody asked for: a broken and incompatible module system, new language syntax like promises, async/await, rest/spread operators, "functional" features, and so on. 9 | 10 | JavaScript is now virtually unrecognizable. In fact, many people new to the language aren't even familiar with callbacks. 11 | 12 | This utility library aims to bring back classic JavaScript to the masses, with plenty of callbacks. 13 | 14 | ## Who is it for 🤔 15 | 16 | Whether you're a classic JS developer who understands the beauty of real JavaScript — *which still works just fine by the way* — or a new developer wary of current trends and looking for a timeless way to code for the web, this library is for you. 17 | 18 | If you want to spend weeks playing around with webpacks and babble scripts and trying to keep up with new changes to the language, then this is not for you. 19 | 20 | This library is for real programmers who aren't afraid to get their hands a little dirty with real code. 21 | 22 | ## Roadmap 🚘 23 | 24 | **Callbaxx** is a brand new NPM package and is still under development. Please submit PRs to add your own functions! 25 | 26 | And feel free to suggest other ideas for how we can Make JavaScript JavaScript Again! Callbaxx is just part of what will hopefully be a wider movement. 27 | 28 | ## Install 🖥 29 | 30 | ```js 31 | npm install callbaxx 32 | var callbaxx = require('callbaxx'); 33 | ``` 34 | 35 | All functions are *error first*. This means the first argument of the callback is an error (hopefully null), and the second argument is the result of the function. 36 | 37 | ## Docs 38 | 39 | ### Arrays 40 | 41 | #### isArray() 42 | 43 | Check if a value is an array 44 | 45 | ```js 46 | var isArray = require('callbaxx').isArray; 47 | 48 | var myArr = [1, 2, 3]; 49 | 50 | isArray(myArr, function(err, res) { 51 | if (res) { 52 | console.log('Wow what an array! It has ' + myArr.length + ' items.'); 53 | } else { 54 | console.log('Hmm that does not look like an array...'); 55 | } 56 | }); 57 | 58 | // Output: Wow what an array! It has 3 items. 59 | 60 | ``` 61 | 62 | #### map() 63 | 64 | Returns a new array with a provided function called on each item of the provided array 65 | 66 | ```js 67 | var map = require('callbaxx').map; 68 | 69 | map([1, 4, 9, 16, 25], Math.sqrt, function(err, res) { 70 | console.log(res); 71 | }); 72 | 73 | // Output: [1, 2, 3, 4, 5] 74 | ``` 75 | 76 | This can also be used with a function which takes a callback (such as another Callbaxx function) as long as it's error-first, just add a `true` parameter after the callback like this: 77 | 78 | ```js 79 | var map = require('callbaxx').map; 80 | var isOdd = require('callbaxx').isOdd; 81 | 82 | map([1, 2, 3, 4, 5], isOdd, function(err, res) { 83 | console.log(res); 84 | }, true); // <— Note the true parameter 85 | 86 | // Output: [true, false, true, false, true] 87 | ``` 88 | 89 | #### reduce() 90 | 91 | Smoosh a given array into a single value 92 | 93 | ```js 94 | var reduce = require('callbaxx').reduce; 95 | 96 | reduce([1, 2, 3], function (a, b) { return a + b }, 0, function(err, res) { 97 | console.log(res); 98 | }); 99 | 100 | // Output: 6 101 | 102 | ``` 103 | 104 | ### Booleans 105 | 106 | #### isTrue() 107 | 108 | Check if a value is equal to true 109 | 110 | ```js 111 | var isTrue = require('callbaxx').isTrue; 112 | 113 | isTrue(true, function(err, res) { 114 | if (res) { 115 | console.log('It is true!'); 116 | } 117 | }); 118 | 119 | // Output: It is true! 120 | ``` 121 | 122 | #### isFalse() 123 | 124 | Check if a value is equal to false 125 | 126 | ```js 127 | var isFalse = require('callbaxx').isFalse; 128 | 129 | isFalse(123, function(err, res) { 130 | if (res) { 131 | console.log('It is false!'); 132 | } else { 133 | console.log('It is NOT false!'); 134 | } 135 | }); 136 | 137 | // Output: It is NOT false! 138 | ``` 139 | 140 | ### Numbers 141 | 142 | #### add() 143 | 144 | Add two numbers together 145 | 146 | ```js 147 | var add = require('callbaxx').add; 148 | 149 | add(40, 2, function(err, res) { 150 | console.log('The result is ' + res + '!'); 151 | }); 152 | 153 | // Output: The result is 42! 154 | 155 | ``` 156 | 157 | #### divide() 158 | 159 | Divides the first number by the second number 160 | 161 | ```js 162 | var divide = require('callbaxx').divide; 163 | 164 | divide(25, 5, function(err, res) { 165 | console.log(res); 166 | }); 167 | 168 | // Output: 5 169 | 170 | ``` 171 | 172 | #### multiply() 173 | 174 | Multiplies two numbers together 175 | 176 | ```js 177 | var multiply = require('callbaxx').multiply; 178 | 179 | multiply(6, 7, function(err, res) { 180 | console.log(res); 181 | }); 182 | 183 | // Output: 42 184 | 185 | ``` 186 | 187 | #### modulo() 188 | 189 | Finds the remainder after dividing the first number by the second number 190 | 191 | ```js 192 | var modulo = require('callbaxx').modulo; 193 | 194 | modulo(5, 3, function(err, res) { 195 | console.log(res); 196 | }); 197 | 198 | // Output: 2 199 | ``` 200 | 201 | #### subtract() 202 | 203 | Subtracts the second number from the first number 204 | 205 | ```js 206 | var subtract = require('callbaxx').subtract; 207 | 208 | subtract(50, 8, function(err, res) { 209 | console.log('The result is ' + res + '!'); 210 | }); 211 | 212 | // Output: The result is 42! 213 | ``` 214 | 215 | #### isNumber() 216 | 217 | Check if a value is a number 218 | 219 | ```js 220 | var isNumber = require('callbaxx').isNumber; 221 | 222 | isNumber(123, function(err, res) { 223 | if (res) { 224 | console.log('Yes, that is a number'); 225 | } else { 226 | console.log('No, that is not a number, sorry'); 227 | } 228 | }); 229 | 230 | // Output: Yes, that is a number 231 | 232 | isNumber('string', function(err, res) { 233 | if (res) { 234 | console.log('Yes, that is a number'); 235 | } else { 236 | console.log('No, that is not a number, sorry'); 237 | } 238 | }); 239 | 240 | // Output: No, that is not a number, sorry 241 | 242 | ``` 243 | 244 | #### isOdd() 245 | 246 | Check if a number is odd 247 | 248 | ```js 249 | var isOdd = require('callbaxx').isOdd; 250 | 251 | isOdd(11, function(err, res) { 252 | if (res) { 253 | console.log('Odd number detected!'); 254 | } 255 | }); 256 | 257 | // Output: Odd number detected! 258 | 259 | ``` 260 | 261 | #### isEven() 262 | 263 | Check if a number is even 264 | 265 | ```js 266 | var isEven = require('callbaxx').isEven; 267 | 268 | isEven(8, function(err, res) { 269 | if (res) { 270 | console.log('Even number detected!'); 271 | } 272 | }); 273 | 274 | // Output: Even number detected! 275 | 276 | ``` 277 | 278 | ### Objects 279 | 280 | #### isObject() 281 | 282 | Check if a value is an object 283 | 284 | ```js 285 | var isObject = require('callbaxx').isObject; 286 | var isTrue = require('callbaxx').isTrue; 287 | 288 | var myObj = { abc: 123 }; 289 | 290 | isObject(myObj, function(err1, objRes) { 291 | isTrue(objRes, function(err2, res) { 292 | if (res) { 293 | console.log('This is an object!'); 294 | } 295 | }); 296 | }); 297 | 298 | // Output: This is an object! 299 | 300 | ``` 301 | 302 | ### Strings 303 | 304 | #### toLowerCase() 305 | 306 | Converts a string to lower case 307 | 308 | ```js 309 | var toLowerCase = require('callbaxx').toLowerCase; 310 | 311 | toLowerCase('FoO BaR!', function(err, res) { 312 | console.log(res); 313 | }); 314 | 315 | // Output: foo bar! 316 | ``` 317 | 318 | 319 | #### toUpperCase() 320 | 321 | Converts a string to upper case 322 | 323 | ```js 324 | var toUpperCase = require('callbaxx').toUpperCase; 325 | 326 | toUpperCase('hello world', function(err, res) { 327 | console.log(res); 328 | }); 329 | 330 | // Output: HELLO WORLD 331 | ``` 332 | 333 | ## License 334 | 335 | Callbaxx is [MIT licensed](LICENSE). 336 | -------------------------------------------------------------------------------- /examples/fibonacci.js: -------------------------------------------------------------------------------- 1 | /** 2 | * * * * * * * * * * * * * * * * * 3 | * Fibonacci sequence example * 4 | * * * * * * * * * * * * * * * * * 5 | * This is a quick example of how callbacks can benefit your synchronous code 6 | * It looks different (and slightly more verbose) than ES6 code, but there's less "magic" 7 | * going on, so you have full control over everything your code is doing. 8 | */ 9 | 10 | var add = require('..').add; 11 | var isNumber = require('..').isNumber; 12 | 13 | function fibonacci(rounds, cb) { 14 | // set up fibonacci sequence with two numbers 15 | var seq = [0, 1]; 16 | // Check 'rounds' arg is a number 17 | isNumber(rounds, function(err, res) { 18 | if (!res) { 19 | console.log('first arg (rounds) must be a number'); 20 | } else { 21 | // for loop 22 | for (i = 0; i < rounds; i++) { 23 | var x = seq[seq.length - 2]; 24 | var y = seq[seq.length - 1]; 25 | // use callbaxx.add to add the numbers together 26 | add(x, y, function(err, res) { 27 | // push result to seq array 28 | seq.push(res); 29 | }); 30 | } 31 | // return seq array with our callback 32 | cb(null, seq); 33 | } 34 | }); 35 | } 36 | 37 | fibonacci(25, function(err, seq) { 38 | if (err) return console.log(err); 39 | console.log('Fibonacci sequence is ' + seq.join(' ') + '!'); 40 | }); 41 | -------------------------------------------------------------------------------- /examples/fizzbuzz.js: -------------------------------------------------------------------------------- 1 | var modulo = require('..').modulo; 2 | var isTrue = require('..').isTrue; 3 | 4 | function fizzbuzz(cb) { 5 | for (var i = 1; i <= 100; i++) { 6 | modulo(i, 15, function(err, res) { 7 | isTrue(res === 0, function(err, res) { 8 | if (res) { 9 | console.log('FizzBuzz'); 10 | } else { 11 | modulo(i, 3, function(err, res) { 12 | isTrue(res === 0, function(err, res) { 13 | if (res) { 14 | console.log('Fizz'); 15 | } else { 16 | modulo(i, 5, function(err, res) { 17 | isTrue(res === 0, function(err, res) { 18 | if (res) { 19 | console.log('Buzz'); 20 | } else { 21 | console.log(i); 22 | } 23 | }); 24 | }); 25 | } 26 | }); 27 | }); 28 | } 29 | }); 30 | }); 31 | } 32 | } 33 | 34 | fizzbuzz(); 35 | -------------------------------------------------------------------------------- /examples/nested-math.js: -------------------------------------------------------------------------------- 1 | /** 2 | * * * * * * * * * * * * * 3 | * Nested math example * 4 | * * * * * * * * * * * * * 5 | * This shows how you can nest several math callbacks together to create more complex calculations 6 | * Try it out yourself, it's a lot simpler than you'd think! 7 | */ 8 | 9 | var add = require('..').add; 10 | var divide = require('..').divide; 11 | var multiply = require('..').multiply; 12 | var modulo = require('..').modulo; 13 | var subtract = require('..').subtract; 14 | 15 | function meaningOfLife(cb) { 16 | add(920, 6, function(err, res) { 17 | modulo(res, 100, function(err, res) { 18 | multiply(res, 50, function(err, res) { 19 | divide(res, 10, function(err, res) { 20 | add(res, 70, function(err, res) { 21 | divide(res, 2, function(err, res) { 22 | subtract(res, 30, function(err, res) { 23 | divide(res, 2, function(err, res) { 24 | add(res, 7, function(err, res) { 25 | cb(res); 26 | }); 27 | }); 28 | }); 29 | }); 30 | }); 31 | }); 32 | }); 33 | }); 34 | }); 35 | } 36 | 37 | meaningOfLife(function(answer) { 38 | // Can you guess what it is? 39 | console.log('The meaning of life is ' + answer + '!'); 40 | }); 41 | 42 | 43 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | add: require('./lib/add'), 3 | divide: require('./lib/divide'), 4 | isArray: require('./lib/isArray'), 5 | isEven: require('./lib/isEven'), 6 | isFalse: require('./lib/isFalse'), 7 | isNumber: require('./lib/isNumber'), 8 | isObject: require('./lib/isObject'), 9 | isOdd: require('./lib/isOdd'), 10 | isTrue: require('./lib/isTrue'), 11 | map: require('./lib/map'), 12 | modulo: require('./lib/modulo'), 13 | multiply: require('./lib/multiply'), 14 | subtract: require('./lib/subtract'), 15 | toLowerCase: require('./lib/toLowerCase'), 16 | toUpperCase: require('./lib/toUpperCase'), 17 | parseNumber: require('./lib/parseNumber') 18 | }; 19 | -------------------------------------------------------------------------------- /lib/add.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Adds two numbers together 3 | */ 4 | 5 | module.exports = function(arg1, arg2, cb) { 6 | cb(null, arg1 + arg2); 7 | } -------------------------------------------------------------------------------- /lib/divide.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Divides the first number by the second number 3 | */ 4 | 5 | module.exports = function(arg1, arg2, cb) { 6 | cb(null, arg1 / arg2); 7 | } -------------------------------------------------------------------------------- /lib/isArray.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if something is an array 3 | */ 4 | 5 | module.exports = function (arg, cb) { 6 | try { 7 | cb(null, Object.prototype.toString.call(arg) === '[object Array]'); 8 | } catch (err) { 9 | cb(err, null); 10 | } 11 | } -------------------------------------------------------------------------------- /lib/isEven.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if a number is even 3 | */ 4 | 5 | const isEven = require('is-even'); 6 | 7 | module.exports = function (arg, cb) { 8 | cb(null, isEven(arg)); 9 | } -------------------------------------------------------------------------------- /lib/isFalse.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if something is equal to false 3 | */ 4 | 5 | module.exports = function (arg, cb) { 6 | cb(null, arg === false); 7 | } -------------------------------------------------------------------------------- /lib/isNumber.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if something is a number 3 | */ 4 | 5 | module.exports = function(arg, cb) { 6 | cb(null, typeof arg === 'number'); 7 | } -------------------------------------------------------------------------------- /lib/isObject.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if something is an object 3 | */ 4 | 5 | module.exports = function (arg, cb) { 6 | try { 7 | cb(null, Object.prototype.toString.call(arg) === '[object Object]'); 8 | } catch (err) { 9 | cb(err, null); 10 | } 11 | } -------------------------------------------------------------------------------- /lib/isOdd.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if a number is odd 3 | */ 4 | 5 | const isOdd = require('is-odd'); 6 | 7 | module.exports = function (arg, cb) { 8 | cb(null, isOdd(arg)); 9 | } -------------------------------------------------------------------------------- /lib/isTrue.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if something is equal to true 3 | */ 4 | 5 | module.exports = function (arg, cb) { 6 | cb(null, arg === true); 7 | } -------------------------------------------------------------------------------- /lib/map.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns a new array with the results of calling a provided function on each item of the provided array 3 | * @param {Array} arr - The main array 4 | * @param {function} mapFn - The function to call on each array item 5 | * @param {function} cb - The main callback function which receives the new array (or error) 6 | * @param {boolean} [mapFnRequiresCallback = false] - Set this to true if mapFn takes a callback, e.g., if it's another callbaxx function 7 | * @param {...*} additionalArgs - Additional arguments to pass to mapFn 8 | */ 9 | 10 | module.exports = function (arr, mapFn, cb, mapFnRequiresCallback = false, ...additionalArgs) { 11 | require('../lib/isArray')(arr, function (err, res) { 12 | if (res) { 13 | var newArr = []; 14 | // Loop over each item of the array 15 | for (i = 0; i < arr.length; i++) { 16 | var item = arr[i]; 17 | // Check if mapFn 18 | if (mapFnRequiresCallback) { 19 | mapFn(item, ...additionalArgs, function (err, res) { 20 | newArr.push(res); 21 | }); 22 | } else { 23 | newArr.push(mapFn(item, ...additionalArgs)); 24 | } 25 | } 26 | cb(null, newArr); 27 | } else { 28 | cb('You must provide an array to callbaxx.map', null); 29 | } 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /lib/modulo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Find the remainder after dividing the first number by the second number 3 | */ 4 | 5 | module.exports = function(arg1, arg2, cb) { 6 | cb(null, arg1 % arg2) 7 | } 8 | -------------------------------------------------------------------------------- /lib/multiply.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Multiplies two numbers 3 | */ 4 | 5 | module.exports = function(arg1, arg2, cb) { 6 | cb(null, arg1 * arg2); 7 | } -------------------------------------------------------------------------------- /lib/parseNumber.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Parses a String to a Number either Float or Int 3 | * @param {String} str - String containing the number 4 | * @param {function} cb - The main callback function which receives the number (or error) 5 | */ 6 | 7 | module.exports = function(str, cb) { 8 | try { 9 | return cb(null, parseFloat(str)); 10 | } catch (err) { 11 | return cb(err, null); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /lib/reduce.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Smoosh an array into a single value 3 | */ 4 | 5 | var isArray = require('./isArray'); 6 | 7 | module.exports = function (arr, fn, init, cb) { 8 | isArray(arr, function (err, res) { 9 | if (res) { 10 | var result = init 11 | for (i = 0; i < arr.length; i++) { 12 | result = fn(result, arr[i], i, arr) 13 | } 14 | cb(null, result); 15 | } else { 16 | cb('You must provide an array to callbaxx.reduce', null); 17 | } 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /lib/subtract.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Subtracts the second number from the first number 3 | */ 4 | 5 | module.exports = function(arg1, arg2, cb) { 6 | cb(null, arg1 - arg2); 7 | } -------------------------------------------------------------------------------- /lib/toLowerCase.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts a string to lower case 3 | */ 4 | 5 | module.exports = function(str, cb) { 6 | try { 7 | cb(null, str.toLowerCase()); 8 | } catch (err) { 9 | cb(err, null); 10 | } 11 | } -------------------------------------------------------------------------------- /lib/toUpperCase.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts a string to upper case 3 | */ 4 | 5 | module.exports = function(str, cb) { 6 | try { 7 | cb(null, str.toUpperCase()); 8 | } catch (err) { 9 | cb(err, null); 10 | } 11 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "callbaxx", 3 | "version": "0.3.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "is-buffer": { 8 | "version": "1.1.6", 9 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 10 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 11 | }, 12 | "is-even": { 13 | "version": "1.0.0", 14 | "resolved": "https://registry.npmjs.org/is-even/-/is-even-1.0.0.tgz", 15 | "integrity": "sha1-drUFX7rY0pSoa2qUkBXhyXtxfAY=", 16 | "requires": { 17 | "is-odd": "^0.1.2" 18 | }, 19 | "dependencies": { 20 | "is-number": { 21 | "version": "3.0.0", 22 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", 23 | "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", 24 | "requires": { 25 | "kind-of": "^3.0.2" 26 | } 27 | }, 28 | "is-odd": { 29 | "version": "0.1.2", 30 | "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-0.1.2.tgz", 31 | "integrity": "sha1-vFc7XONx7yqtbm9JeZtyvvE5eKc=", 32 | "requires": { 33 | "is-number": "^3.0.0" 34 | } 35 | } 36 | } 37 | }, 38 | "is-number": { 39 | "version": "6.0.0", 40 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-6.0.0.tgz", 41 | "integrity": "sha512-Wu1VHeILBK8KAWJUAiSZQX94GmOE45Rg6/538fKwiloUu21KncEkYGPqob2oSZ5mUT73vLGrHQjKw3KMPwfDzg==" 42 | }, 43 | "is-odd": { 44 | "version": "3.0.1", 45 | "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-3.0.1.tgz", 46 | "integrity": "sha512-CQpnWPrDwmP1+SMHXZhtLtJv90yiyVfluGsX5iNCVkrhQtU3TQHsUWPG9wkdk9Lgd5yNpAg9jQEo90CBaXgWMA==", 47 | "requires": { 48 | "is-number": "^6.0.0" 49 | } 50 | }, 51 | "kind-of": { 52 | "version": "3.2.2", 53 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", 54 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", 55 | "requires": { 56 | "is-buffer": "^1.1.5" 57 | } 58 | }, 59 | "lodash": { 60 | "version": "4.17.10", 61 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", 62 | "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "callbaxx", 3 | "version": "0.3.0", 4 | "description": " A JS utility library to bring classic callback style programming to synchronous code 🔥", 5 | "main": "index.js", 6 | "directories": { 7 | "lib": "lib" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/scf4/callbaxx.git" 15 | }, 16 | "author": "@scf4", 17 | "license": "MIT", 18 | "bugs": { 19 | "url": "https://github.com/scf4/callbaxx/issues" 20 | }, 21 | "homepage": "https://github.com/scf4/callbaxx#readme", 22 | "dependencies": { 23 | "is-even": "^1.0.0", 24 | "is-odd": "^3.0.1", 25 | "lodash": "^4.17.10" 26 | } 27 | } 28 | --------------------------------------------------------------------------------