{"id":15767888,"url":"https://github.com/paulogdm/callbaxx","last_synced_at":"2025-08-24T17:43:39.792Z","repository":{"id":86793064,"uuid":"147690010","full_name":"paulogdm/callbaxx","owner":"paulogdm","description":"🔥 A JS utility library to bring classic callback style programming to synchronous code 🔥","archived":false,"fork":false,"pushed_at":"2018-09-06T15:08:17.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T21:39:21.641Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulogdm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-06T14:53:49.000Z","updated_at":"2018-11-26T20:28:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"c19a6603-349a-45ae-b67a-268926527b06","html_url":"https://github.com/paulogdm/callbaxx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paulogdm/callbaxx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulogdm%2Fcallbaxx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulogdm%2Fcallbaxx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulogdm%2Fcallbaxx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulogdm%2Fcallbaxx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulogdm","download_url":"https://codeload.github.com/paulogdm/callbaxx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulogdm%2Fcallbaxx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271916155,"owners_count":24843192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T13:41:39.219Z","updated_at":"2025-08-24T17:43:39.731Z","avatar_url":"https://github.com/paulogdm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e⭐️⭐️⭐️\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e🔥 Callbaxx 🔥\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e⭐️⭐️⭐️\u003c/p\u003e\n\n[![GitHub issues](https://img.shields.io/github/issues/scf4/callbaxx.svg)](https://github.com/scf4/callbaxx/issues)\n [![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/callbaxx.svg)]()\n [![GitHub stars](https://img.shields.io/github/stars/scf4/callbaxx.svg)](https://bundlephobia.com/result?p=callbax)\n\nIn 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.\n\nJavaScript is now virtually unrecognizable. In fact, many people new to the language aren't even familiar with callbacks.\n\nThis utility library aims to bring back classic JavaScript to the masses, with plenty of callbacks.\n\n## Who is it for 🤔\n\nWhether 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.\n\nIf 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.\n\nThis library is for real programmers who aren't afraid to get their hands a little dirty with real code.\n\n## Roadmap 🚘\n\n**Callbaxx** is a brand new NPM package and is still under development. Please submit PRs to add your own functions!\n\nAnd 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.\n\n## Install 🖥\n\n```js\nnpm install callbaxx\nvar callbaxx = require('callbaxx');\n```\n\nAll 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.\n\n## Docs\n\n### Arrays\n\n#### isArray()\n\nCheck if a value is an array\n\n```js\nvar isArray = require('callbaxx').isArray;\n\nvar myArr = [1, 2, 3];\n\nisArray(myArr, function(err, res) {\n  if (res) {\n    console.log('Wow what an array! It has ' + myArr.length + ' items.');\n  } else {\n    console.log('Hmm that does not look like an array...');\n  }\n});\n\n// Output: Wow what an array! It has 3 items.\n\n```\n\n#### map()\n\nReturns a new array with a provided function called on each item of the provided array\n\n```js\nvar map = require('callbaxx').map;\n\nmap([1, 4, 9, 16, 25], Math.sqrt, function(err, res) {\n  console.log(res);\n});\n\n// Output: [1, 2, 3, 4, 5]\n\n```\n\n#### reduce()\n\nSmoosh a given array into a single value\n\n```js\nvar reduce = require('callbaxx').map;\n\nreduce([1, 2, 3], function (a, b) { return a + b }, 0, function(err, res) {\n    console.log(res);\n});\n\n// Output: 6\n\n```\n\n### Booleans\n\n#### isTrue()\n\nCheck if a value is equal to true\n\n```js\nvar isTrue = require('callbaxx').isTrue;\n\nisTrue(true, function(err, res) {\n  if (res) {\n    console.log('It is true!');\n  }\n});\n\n// Output: It is true!\n```\n\n#### isFalse()\n\nCheck if a value is equal to false\n\n```js\nvar isFalse = require('callbaxx').isFalse;\n\nisFalse(123, function(err, res) {\n  if (res) {\n    console.log('It is false!');\n  } else {\n    console.log('It is NOT false!');\n  }\n});\n\n// Output: It is NOT false!\n```\n\n### Numbers\n\n#### add()\n\nAdd two numbers together\n\n```js\nvar add = require('callbaxx').add;\n\nadd(40, 2, function(err, res) {\n  console.log('The result is ' + res + '!');\n});\n\n// Output: The result is 42!\n\n```\n\n#### divide()\n\nDivides the first number by the second number\n\n```js\nvar divide = require('callbaxx').divide;\n\ndivide(25, 5, function(err, res) {\n  console.log(res);\n});\n\n// Output: 5\n\n```\n\n#### multiply()\n\nMultiplies two numbers together\n\n```js\nvar multiply = require('callbaxx').multiply;\n\nmultiply(6, 7, function(err, res) {\n  console.log(res);\n});\n\n// Output: 42\n\n```\n\n#### subtract()\n\nSubtracts the second number from the first number\n\n```js\nvar subtract = require('callbaxx').subtract;\n\nsubtract(50, 8, function(err, res) {\n  console.log('The result is ' + res + '!');\n});\n\n// Output: The result is 42!\n```\n\n#### isNumber()\n\nCheck if a value is a number\n\n```js\nvar isNumber = require('callbaxx').isNumber;\n\nisNumber(123, function(err, res) {\n  if (res) {\n    console.log('Yes, that is a number');\n  } else {\n    console.log('No, that is not a number, sorry');\n  }\n});\n\n// Output: Yes, that is a number\n\nisNumber('string', function(err, res) {\n  if (res) {\n    console.log('Yes, that is a number');\n  } else {\n    console.log('No, that is not a number, sorry');\n  }\n});\n\n// Output: No, that is not a number, sorry\n\n```\n\n#### isOdd()\n\nCheck if a number is odd\n\n```js\nvar isOdd = require('callbaxx').isOdd;\n\nisOdd(11, function(err, res) {\n  if (res) {\n    console.log('Odd number detected!');\n  }\n});\n\n// Output: Odd number detected!\n\n```\n\n#### isEven()\n\nCheck if a number is even\n\n```js\nvar isEven = require('callbaxx').isEven;\n\nisEven(8, function(err, res) {\n  if (res) {\n    console.log('Even number detected!');\n  }\n});\n\n// Output: Even number detected!\n\n```\n\n### Objects\n\n#### isObject()\n\nCheck if a value is an object\n\n```js\nvar isObject = require('callbaxx').isObject;\nvar isTrue = require('callbaxx').isTrue;\n\nvar myObj = { abc: 123 };\n\nisObject(myObj, function(err1, objRes) {\n  isTrue(objRes, function(err2, res) {\n    if (res) {\n      console.log('This is an object!');\n    }\n  });\n});\n\n// Output: This is an object!\n\n```\n\n### Strings\n\n#### toLowerCase()\n\nConverts a string to lower case\n\n```js\nvar toLowerCase = require('callbaxx').toLowerCase;\n\ntoLowerCase('FoO BaR!', function(err, res) {\n  console.log(res);\n});\n\n// Output: foo bar!\n```\n\n\n#### toUpperCase()\n\nConverts a string to upper case\n\n```js\nvar toUpperCase = require('callbaxx').toUpperCase;\n\ntoUpperCase('hello world', function(err, res) {\n  console.log(res);\n});\n\n// Output: HELLO WORLD\n```\n\n## License\n\n Callbaxx is [MIT licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulogdm%2Fcallbaxx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulogdm%2Fcallbaxx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulogdm%2Fcallbaxx/lists"}