{"id":20885889,"url":"https://github.com/zotero/utilities","last_synced_at":"2025-05-12T19:31:47.413Z","repository":{"id":40554223,"uuid":"379545608","full_name":"zotero/utilities","owner":"zotero","description":"Zotero utility code","archived":false,"fork":false,"pushed_at":"2024-10-16T04:40:16.000Z","size":317,"stargazers_count":11,"open_issues_count":14,"forks_count":21,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-17T19:46:49.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zotero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2021-06-23T09:15:02.000Z","updated_at":"2024-10-16T04:40:20.000Z","dependencies_parsed_at":"2024-04-05T06:29:41.134Z","dependency_job_id":"8dd73d6e-1ad9-487b-8444-6f72131ab854","html_url":"https://github.com/zotero/utilities","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zotero%2Futilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zotero%2Futilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zotero%2Futilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zotero%2Futilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zotero","download_url":"https://codeload.github.com/zotero/utilities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225148800,"owners_count":17428430,"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-18T08:14:55.640Z","updated_at":"2025-05-12T19:31:47.404Z","avatar_url":"https://github.com/zotero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zotero Utilities\n\nZotero utility code common across various codebases such as the Zotero client,\nZotero translation architecture and others.\n\nItem utility functions require:\n- Calling `Zotero.Schema.init(json)` with the JSON from `schema.json` from Zotero schema repo\n- Calling `Zotero.Date.init(json)` with the JSON from `resource/dateFormats.json`\n- Loading `resource/zoteroTypeSchemaData.js` before `cachedTypes.js` or in Node.js running\n  ```js\n    let CachedTypes = require('./cachedTypes')\n    CachedTypes.setTypeSchema(require('./resource/zoteroTypeSchemaData'))\n  ```\n- Implementing `Zotero.localeCompare()`; a simple implementation would be\n  ```js\n    let collator = new Intl.Collator(['en-US'], {\n      numeric: true,\n      sensitivity: 'base'\n    });\n    Zotero.localeCompare = (a, b) =\u003e collator.compare(a, b);\n  ```\n\nPlease bundle the [Zotero schema](https://github.com/zotero/zotero-schema) file with your repository, do not load it remotely.\n\nTo run tests:\n\n```bash\ngit clone --recursive https://github.com/zotero/utilities.git\ncd utilities\nnpm i\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzotero%2Futilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzotero%2Futilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzotero%2Futilities/lists"}