{"title":"Caterpillar","name":"caterpillar","version":"8.0.0-next.1701813187.7097ca02ad8da36e3039c056f68f20bb86259c3f","description":"Caterpillar is the ultimate logging system for Deno, Node.js, and Web Browsers. Log levels are implemented to the RFC standard. Log entries can be filtered and piped to various streams, including coloured output to the terminal, the browser's console, and","homepage":"https://github.com/bevry/caterpillar","license":"Artistic-2.0","keywords":["browser","caterpillar","console","debug","deno","deno-edition","deno-entry","denoland","dom","es2015","es2017","es2022","es5","log","logger","logging","module","node","stream","transform","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"caterpillar","githubSlug":"bevry/caterpillar","npmPackageName":"caterpillar"}},"funding":"https://bevry.me/fund","author":{"name":"2012+ Bevry Pty Ltd","email":"us@bevry.me","url":"http://bevry.me"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"},{"name":"Tim Helfensdörfer","email":"tim@visualappeal.de","url":"https://github.com/thelfensdrfer"},{"name":"t-visualappeal","url":"https://github.com/t-visualappeal"}],"bugs":{"url":"https://github.com/bevry/caterpillar/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/caterpillar.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for web browsers with Import for modules","directory":"edition-browsers","entry":"index.js","tags":["compiled","javascript","import"],"engines":{"node":false,"browsers":"defaults"}},{"description":"TypeScript compiled against ES2022 for Node.js 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2017 for Node.js 12 with Require for modules","directory":"edition-es2017","entry":"index.js","tags":["compiled","javascript","es2017","require"],"engines":{"node":"8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2015 for Node.js 6 with Require for modules","directory":"edition-es2015","entry":"index.js","tags":["compiled","javascript","es2015","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16","browsers":false}},{"description":"TypeScript compiled against ES2017 for Node.js 12 with Import for modules","directory":"edition-es2017-esm","entry":"index.js","tags":["compiled","javascript","es2017","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":true}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2017-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"},"browser":{"types":"./edition-types/index.d.ts","import":"./edition-browsers/index.js"}},"deno":"edition-deno/index.ts","browser":"edition-browsers/index.js","module":"edition-browsers/index.js","dependencies":{"@bevry/ansi":"^6.7.0","editions":"^6.19.0","get-current-line":"^7.1.0","rfc-log-levels":"^4.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.10.3","@typescript-eslint/eslint-plugin":"^6.13.2","@typescript-eslint/parser":"^6.13.2","assert-helpers":"^11.9.0","eslint":"^8.55.0","eslint-config-bevry":"^5.2.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.5.0","make-deno-edition":"^2.0.1","prettier":"^3.1.0","projectz":"^3.4.0","typedoc":"^0.25.4","typescript":"5.3.2","valid-directory":"^4.6.0","valid-module":"^2.6.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-browsers && npm run our:compile:edition-es2015 && npm run our:compile:edition-es2017 && npm run our:compile:edition-es2017-esm && npm run our:compile:edition-es2022 && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-browsers":"tsc --module ESNext --target ES2022 --outDir ./edition-browsers --project tsconfig.json && ( test ! -d edition-browsers/source || ( mv edition-browsers/source edition-temp && rm -rf edition-browsers && mv edition-temp edition-browsers ) )","our:compile:edition-es2015":"tsc --module commonjs --target ES2015 --outDir ./edition-es2015 --project tsconfig.json && ( test ! -d edition-es2015/source || ( mv edition-es2015/source edition-temp && rm -rf edition-es2015 && mv edition-temp edition-es2015 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2015/package.json","our:compile:edition-es2017":"tsc --module commonjs --target ES2017 --outDir ./edition-es2017 --project tsconfig.json && ( test ! -d edition-es2017/source || ( mv edition-es2017/source edition-temp && rm -rf edition-es2017 && mv edition-temp edition-es2017 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2017/package.json","our:compile:edition-es2017-esm":"tsc --module ESNext --target ES2017 --outDir ./edition-es2017-esm --project tsconfig.json && ( test ! -d edition-es2017-esm/source || ( mv edition-es2017-esm/source edition-temp && rm -rf edition-es2017-esm && mv edition-temp edition-es2017-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2017-esm/package.json","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:module && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:module":"valid-module","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"],"rules":{"class-methods-use-this":"off"}},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5","endOfLine":"lf"},"boundation":{"dom":true},"_id":"caterpillar@8.0.0-next.1701813187.7097ca02ad8da36e3039c056f68f20bb86259c3f","readme":"<!-- TITLE/ -->\n\n<h1>Caterpillar</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/caterpillar/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/caterpillar/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/caterpillar\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/caterpillar.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/caterpillar\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/caterpillar.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nCaterpillar is the ultimate logging system for Deno, Node.js, and Web Browsers. Log levels are implemented to the RFC standard. Log entries can be filtered and piped to various streams, including coloured output to the terminal, the browser's console, and debug files. You can even write your own transforms.\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.caterpillar.bevry.surge.sh/docs/)\n\n### Examples\n\n-   [Deno Example](https://repl.it/@balupton/caterpillar-deno)\n-   [Node.js Example](https://repl.it/@balupton/caterpillar-node)\n-   [Web Browser Example](https://repl.it/@balupton/caterpillar-browser)\n-   [Writing a Custom Transform](https://repl.it/@balupton/caterpillar-custom-transform)\n\n### Overview\n\nThe RFC Log Levels are provided by the [`rfc-log-levels` package](https://github.com/bevry/rfc-log-levels) which follows [RFC 3164 - The BSD Syslog Protocol](http://www.faqs.org/rfcs/rfc3164.html).\n\n[Log Entries](http://master.caterpillar.bevry.surge.sh/docs/interfaces/logentry.html) that are within the [lineLevel](http://master.caterpillar.bevry.surge.sh/docs/classes/logger.html#linelevel) range, will have their line information fetched using the [`get-current-line` package](https://github.com/bevry/get-current-line).\n\nThe [`Logger`](http://master.caterpillar.bevry.surge.sh/docs/classes/logger.html) is what you write your log messages to, which you then pipe to destinations and transforms.\n\nThe [`Filter` transport](http://master.caterpillar.bevry.surge.sh/docs/classes/filter.html) is used to filter out log levels that we do not want to pass onto the next destination.\n\nThe [`Human` transport](http://master.caterpillar.bevry.surge.sh/docs/classes/human.html) is used to convert the Log Entries into a human readable and colourful output.\n\nThe [`Browser` transport](https://github.com/bevry/caterpillar/blob/master/source/transforms/browser.ts) is used to send the human output, including colours, to the Web Browser console.\n\nThe [`Transform`](http://master.caterpillar.bevry.surge.sh/docs/classes/transform.html) is used to write your own transforms, and is what all the others are based from.\n\n### Node.js Guide\n\nTo get started for Node.js, setup a new Node.js project for this guide and install Caterpillar.\n\n```bash\nmkdir caterpillar-guide\ncd caterpillar-guide\nnpm init\nnpm install --save caterpillar\ntouch index.js\n```\n\nThen edit our `index.js` file with the following, that will output all the log messages in JSON format to stdout, and can be run via `node index.js`:\n\n```javascript\nconst { Logger } = require('caterpillar')\nconst logger = new Logger()\n\nlogger.pipe(process.stdout)\n\nlogger.log('warn', 'this is a warning, which is level', 4)\nlogger.warn('this is a warning, which is level', 4)\nlogger.log('debug', 'this is a debug message, which is level', 7)\nlogger.warn('this is a debug message, which is level', 7)\n```\n\nOutputting in JSON format is not a nice experience, instead we can do better by using the [`Human` transport](http://master.caterpillar.bevry.surge.sh/docs/classes/human.html) such that it is human readable.\n\n```javascript\nconst { Logger, Human } = require('caterpillar')\nconst logger = new Logger()\n\nlogger.pipe(new Human()).pipe(process.stdout)\n\nlogger.log('warn', 'this is a warning, which is level', 4)\nlogger.warn('this is a warning, which is level', 4)\nlogger.log('debug', 'this is a debug message, which is level', 7)\nlogger.warn('this is a debug message, which is level', 7)\n```\n\nHowever, perhaps we want to still store the JSON format for querying later. We can pipe the human format to stdout as before, but we can pipe the raw output to a debug file.\n\n```javascript\nconst { Logger, Human } = require('caterpillar')\nconst logger = new Logger()\n\nconst { createWriteStream } = require('fs')\nlogger.pipe(createWriteStream('./debug.log'))\n\nlogger.pipe(new Human()).pipe(process.stdout)\n\nlogger.log('warn', 'this is a warning, which is level', 4)\nlogger.warn('this is a warning, which is level', 4)\nlogger.log('debug', 'this is a debug message, which is level', 7)\nlogger.warn('this is a debug message, which is level', 7)\n```\n\nNow let's stay for some reason, we want to capitalise all the log messages that are warning levels and higher, we can do this by making our own transport by extending the [`Transform`](http://master.caterpillar.bevry.surge.sh/docs/classes/transform.html).\n\n```javascript\nconst { Logger, Transform, Human } = require('caterpillar')\nconst logger = new Logger()\n\nconst { createWriteStream } = require('fs')\nlogger.pipe(createWriteStream('./debug.log'))\n\nclass Uppercase extends Transform {\n    format(entry) {\n        if (entry.levelNumber <= 4) {\n            entry.args.forEach(function (value, index) {\n                if (typeof value === 'string') {\n                    entry.args[index] = value.toUpperCase()\n                }\n            })\n        }\n        return entry\n    }\n}\n\nlogger.pipe(new Uppercase()).pipe(new Human()).pipe(process.stdout)\n\nlogger.log('warn', 'this is a warning, which is level', 4)\nlogger.warn('this is a warning, which is level', 4)\nlogger.log('debug', 'this is a debug message, which is level', 7)\nlogger.warn('this is a debug message, which is level', 7)\n```\n\nFuthermore, the user probably doesn't need to see debug messages, even though they are useful for debugging. We can filter out the debug messages for the user, but maintain them for the `debug.log` file by applying the [`Filter` transport](http://master.caterpillar.bevry.surge.sh/docs/classes/filter.html) to the pipe that goes to stdout.\n\n```javascript\nconst { Logger, Transform, Filter, Human } = require('caterpillar')\nconst logger = new Logger()\n\nconst { createWriteStream } = require('fs')\nlogger.pipe(createWriteStream('./debug.log'))\n\nclass Uppercase extends Transform {\n    format(entry) {\n        if (entry.levelNumber <= 4) {\n            entry.args.forEach(function (value, index) {\n                if (typeof value === 'string') {\n                    entry.args[index] = value.toUpperCase()\n                }\n            })\n        }\n        return entry\n    }\n}\n\nlogger\n    .pipe(new Filter({ filterLevel: 5 }))\n    .pipe(new Uppercase())\n    .pipe(new Human())\n    .pipe(process.stdout)\n\nlogger.log('warn', 'this is a warning, which is level', 4)\nlogger.warn('this is a warning, which is level', 4)\nlogger.log('debug', 'this is a debug message, which is level', 7)\nlogger.warn('this is a debug message, which is level', 7)\n```\n\nAs fetching line information is computationally expensive process, for large applications for performance we probably only want to fetch the line information for messages that we actually show to the user. As such, we should make the [`filterLevel`](http://master.caterpillar.bevry.surge.sh/docs/classes/filter.html#filterlevel) and the [`lineLevel`](http://master.caterpillar.bevry.surge.sh/docs/classes/logger.html#linelevel) the same.\n\n```javascript\nconst { Logger, Transform, Filter, Human } = require('caterpillar')\nconst level = 5\nconst logger = new Logger({ lineLevel: level })\n\nconst { createWriteStream } = require('fs')\nlogger.pipe(createWriteStream('./debug.log'))\n\nclass Uppercase extends Transform {\n    format(entry) {\n        if (entry.levelNumber <= 4) {\n            entry.args.forEach(function (value, index) {\n                if (typeof value === 'string') {\n                    entry.args[index] = value.toUpperCase()\n                }\n            })\n        }\n        return entry\n    }\n}\n\nlogger\n    .pipe(new Filter({ filterLevel: 5 }))\n    .pipe(new Uppercase())\n    .pipe(new Human())\n    .pipe(process.stdout)\n\nlogger.log('warn', 'this is a warning, which is level', 4)\nlogger.warn('this is a warning, which is level', 4)\nlogger.log('debug', 'this is a debug message, which is level', 7)\nlogger.warn('this is a debug message, which is level', 7)\n```\n\nFinally, if we are using Caterpillar in web browser environments, instead of Node.js, instead of doing:\n\n```javascript\nconst { Logger, Transform, Filter, Human } = require('caterpillar')\n// ...\nlogger.pipe(new Human()).pipe(process.stdout)\n// ...\n```\n\nWe would pipe to the Browser transform instead of to stdout.\n\n```javascript\nconst { Logger, Transform, Filter, Human, Browser } = require('caterpillar')\n// ...\nlogger.pipe(new Human()).pipe(new Browser())\n// ...\n```\n\nWith this, you now have enough information to leverage the cross-platform power of Caterpillar for most purposes, and the power to write your own custom transforms which can be published as their own packages and shared.\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save caterpillar</code></li>\n<li>Import: <code>import * as pkg from ('caterpillar')</code></li>\n<li>Require: <code>const pkg = require('caterpillar')</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport * as pkg from 'https://unpkg.com/caterpillar@^8.0.0/edition-deno/index.ts'\n```\n\n<a href=\"https://www.skypack.dev\" title=\"Skypack is a JavaScript Delivery Network for modern web apps\"><h3>Skypack</h3></a>\n\n``` html\n<script type=\"module\">\n    import * as pkg from '//cdn.skypack.dev/caterpillar@^8.0.0'\n</script>\n```\n\n<a href=\"https://unpkg.com\" title=\"unpkg is a fast, global content delivery network for everything on npm\"><h3>unpkg</h3></a>\n\n``` html\n<script type=\"module\">\n    import * as pkg from '//unpkg.com/caterpillar@^8.0.0'\n</script>\n```\n\n<a href=\"https://jspm.io\" title=\"Native ES Modules CDN\"><h3>jspm</h3></a>\n\n``` html\n<script type=\"module\">\n    import * as pkg from '//dev.jspm.io/caterpillar@8.0.0'\n</script>\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>caterpillar</code> aliases <code>caterpillar/index.cjs</code> which uses the <a href=\"https://github.com/bevry/editions\" title=\"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>\n<li><code>caterpillar/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>caterpillar/edition-browsers/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for web browsers with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>caterpillar/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>caterpillar/edition-es2017/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#8th_Edition_-_ECMAScript_2017\" title=\"ECMAScript ES2017\">ES2017</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>caterpillar/edition-es2015/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://babeljs.io/docs/en/learn#ecmascript-2015-features\" title=\"ECMAScript 2015\">ES2015</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 6 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>caterpillar/edition-es5/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES5 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 4 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>caterpillar/edition-es2017-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#8th_Edition_-_ECMAScript_2017\" title=\"ECMAScript ES2017\">ES2017</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>caterpillar/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>caterpillar/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/caterpillar/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/caterpillar/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/caterpillar\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/caterpillar/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/caterpillar\">view contributions</a></li>\n<li><a href=\"https://github.com/thelfensdrfer\">Tim Helfensdörfer</a> — <a href=\"https://github.com/bevry/caterpillar/commits?author=thelfensdrfer\" title=\"View the GitHub contributions of Tim Helfensdörfer on repository bevry/caterpillar\">view contributions</a></li>\n<li><a href=\"https://github.com/t-visualappeal\">t-visualappeal</a> — <a href=\"https://github.com/bevry/caterpillar/commits?author=t-visualappeal\" title=\"View the GitHub contributions of t-visualappeal on repository bevry/caterpillar\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/caterpillar/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2012+ <a href=\"http://bevry.me\">Bevry Pty Ltd</a></li>\n<li>Copyright &copy; 2011 <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"7097ca02ad8da36e3039c056f68f20bb86259c3f","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-tAtxSGg7tAs8xeGwTBkmR8h6/9l5rHaJ+dZSqZi7Lirr+z307JyOdUfNaJqAa4/YQcaCaijdmX7AUhQ6PUmAhg==","shasum":"1f0294a72a3f005ebb7668b98dcc81b07521a471","tarball":"http://registry-npm.ywwl.com/caterpillar/download/caterpillar-8.0.0-next.1701813187.7097ca02ad8da36e3039c056f68f20bb86259c3f.tgz","fileCount":72,"unpackedSize":234390,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEB2UyXU6rV6zcw4QAqG3zRiitkpJNTjXCEa4DZZQcdKAiEA5ir7XY1SolHQNzx2+I7oA75tJAEAJ+NfGYG07BDTU8s="}],"size":32578,"noattachment":false,"key":"/caterpillar/-/caterpillar-8.0.0-next.1701813187.7097ca02ad8da36e3039c056f68f20bb86259c3f.tgz"},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/caterpillar_8.0.0-next.1701813187.7097ca02ad8da36e3039c056f68f20bb86259c3f_1701813189247_0.8080253533720103"},"_hasShrinkwrap":false,"publish_time":1701813189570,"_cnpm_publish_time":1701813189570,"dist-tags":{"latest":"8.2.0","next":"8.2.0-next.1703862476.17c06ffc583a010f8cf883da66b6f7a986bd2ab1"}}