Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

pull-toolkit

A tiny, dependency-free collection of everyday JavaScript utility functions — the kind of small helpers every project ends up writing at some point.

const { capitalize, slugify, unique, sum, chunk } = require('pull-toolkit');

capitalize('hello world'); // "Hello world"
slugify('Hello, World!');  // "hello-world"
unique([1, 2, 2, 3]);      // [1, 2, 3]
sum([1, 2, 3, 4]);         // 10
chunk([1, 2, 3, 4, 5], 2); // [[1, 2], [3, 4], [5]]

Why this exists

pull-toolkit is intentionally small. There's no build step, no dependencies, and no framework to learn — just plain JavaScript functions and tests, so the codebase stays easy to read from top to bottom.

This also makes it a good place to make your first open source contribution. It's the official practice repository for Pull's First Contribution program — real issues, a real review process, a real merged pull request, on a codebase small enough to hold in your head.

Installation

git clone https://github.com/pull-dev/pull-first-contribution.git
cd pull-first-contribution
npm install

There are no runtime dependencies, so npm install just sets up dev tooling.

Running tests

npm test

API

Strings

  • capitalize(str) — uppercases the first letter of a string.
  • slugify(str) — converts a string into a URL-friendly slug.

Arrays

  • unique(arr) — returns a new array with duplicate values removed.
  • sum(arr) — returns the sum of all numbers in an array.
  • chunk(arr, size) — splits an array into chunks of the given size.

Contributing

New here? Start with CONTRIBUTING.md — it walks through the entire workflow, from finding an issue to opening your first pull request.

Please also read our Code of Conduct.

License

MIT

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages