{"id":19142131,"url":"https://github.com/eldoy/waveorb-util","last_synced_at":"2025-02-22T19:20:58.423Z","repository":{"id":139869174,"uuid":"487984530","full_name":"eldoy/waveorb-util","owner":"eldoy","description":"Utility functions for Waveorb","archived":false,"fork":false,"pushed_at":"2024-03-23T11:15:20.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T22:06:48.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eldoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-05-02T20:40:09.000Z","updated_at":"2023-06-30T11:53:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"83528337-20fb-46d7-bcc3-cc0bcb5f6a19","html_url":"https://github.com/eldoy/waveorb-util","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"a0cb6b6db2efc46a4327254ad4bb0ba00c2ba5b8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fwaveorb-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fwaveorb-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fwaveorb-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fwaveorb-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldoy","download_url":"https://codeload.github.com/eldoy/waveorb-util/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240223193,"owners_count":19767593,"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","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-11-09T07:26:03.633Z","updated_at":"2025-02-22T19:20:58.398Z","avatar_url":"https://github.com/eldoy.png","language":"JavaScript","readme":"# Waveorb Util\n\nUtility functions for [Waveorb.](https://waveorb.com)\n\nVarious Javascript functions needed for web applications. It is included in new Waveorb applications by default.\n\n### Install\n\n```\nnpm i waveorb-util\n```\n\n### Usage\n\n#### Frontend\n\nCopy the `dist/util.js` file to the `app/assets/js/` folder in you application.\n\n```js\nvar util = require('waveorb-util')\n\n// Include some\nglobal.globals = ['sleep', 'clearErrors']\nfor (var fn of globals) {\n  global[fn] = util[fn]\n}\n\n// Include all\nglobal.globals = Object.keys(util)\nfor (var fn in util) {\n  global[fn] = util[fn]\n}\n```\n\nTo make the available client side, include them in your layout, in the `head` or at the end of `body` tag, depending on your needs:\n\n```js\nasync function()\n\u003chead\u003e\n  ...\n  \u003cscript\u003e\n    ${global.globals.map(function(fn) {\n      return h`window.${fn} = ${util[fn]}`\n    })}\n  \u003c/script\u003e\n\u003c/head\u003e\n```\n\n#### Backend\n\nInstall:\n```\nnpm i waveorb-util\n```\n\nUsage:\n```js\nvar { sleep } = require('waveorb-util')\n```\n\nTo install functions globally server side, use the `init` hook:\n\n```js\nvar util = require('waveorb-util')\nglobal.sleep = util.sleep\n```\n\nSee the source code for documentation.\n\n### License\n\nISC Licensed. Enjoy!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Fwaveorb-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldoy%2Fwaveorb-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Fwaveorb-util/lists"}