https://github.com/quartz/js-utils
A collection of reusable JavaScript utilities for Quartz products.
https://github.com/quartz/js-utils
helpers typescript utility-library
Last synced: about 1 year ago
JSON representation
A collection of reusable JavaScript utilities for Quartz products.
- Host: GitHub
- URL: https://github.com/quartz/js-utils
- Owner: Quartz
- Created: 2020-08-12T22:27:38.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-07-20T17:20:08.000Z (almost 4 years ago)
- Last Synced: 2025-04-18T08:18:51.703Z (about 1 year ago)
- Topics: helpers, typescript, utility-library
- Language: JavaScript
- Homepage:
- Size: 153 KB
- Stars: 2
- Watchers: 11
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Quartz JavaScript utilities
[](https://www.npmjs.com/package/@quartz/js-utils)
A collection of reusable JavaScript utilities for Quartz products, with optional TypeScript support.
All functions are written in TypeScript and transpiled into ES2017 JavaScript (with type definitions).
## Installation
`npm i @quartz/js-utils`
## Usage
Import functions from the js-utils package, e.g.
`import { arrayFromRange, resizeWPImage } from '@quartz/js-utils'`
TypeScript hints are available if the file into which the functions are imported is a `.ts` or `.tsx` file.
## Contributing
Functions must be written in TypeScript whenever possible.
Export one function per file with a test suite (`.test.js`).
### Before opening a pull request
- Export any new functions to `src/index.ts`
- Add a test suite for any new functions
- Ensure tests pass (`npm t`)
- Increment the `package.json` version using `npm version`
## Deploying
Use `npm publish` to publish the package to npm. TypeScript will be built on publish (via `npm run build`).