<commit_before># zpad - Zero padding for Node.js

*zpad* is a tiny Node.js module for zero padding strings and numbers, because I got tired of copypasting a function for this in every other thing I've been writing.

## Installation

*zpad* is available via npm:

```bash
$ npm install zpad
```

## Usage

```javascript
var zpad = require('zpad');
zpad(5);            // -> "05", zpad pads to 2 digits by default
zpad(5, 3);         // -> "005", you can pass a second parameter to specify the amount of digits
zpad.default(3);    // change the default padding amount by calling zpad.default with a number
zpad.default();     // -> 3, returns the padding amount with no arguments
zpad(5);            // -> "005"
zpad.padWith('X');  // change the character used for padding by calling zpad.padWith with a string
zpad.padWith();     // -> "X", returns the padding character with no arguments
zpad(5);            // -> "XX5"
zpad(5, 3, 'Z');    // -> "ZZ5", you can also pass custom pad character as third parameter

// .default and .padWith can also be chained, allowing you to define them when loading the module
var pad = require('zpad').default(4).padWith('Y');
pad(5);             // -> "YYYY5"
```

## Legalese

No Rights Reserved, *zpad* has been released under [CC0](http://creativecommons.org/publicdomain/zero/1.0/). As such, feel free to use it in any manner you want.<commit_msg>Adjust readme to function renaming<commit_after># zpad - Zero padding for Node.js

*zpad* is a tiny Node.js module for zero padding strings and numbers, because I got tired of copypasting a function for this in every other thing I've been writing.

## Installation

*zpad* is available via npm:

```bash
$ npm install zpad
```

## Usage

```javascript
var zpad = require('zpad');
zpad(5);             // -> "05", zpad pads to 2 digits by default
zpad(5, 3);          // -> "005", you can pass a second parameter to specify the amount of digits
zpad.default(3);     // change the default padding amount by calling zpad.default with a number
zpad.default();      // -> 3, returns the padding amount with no arguments
zpad(5);             // -> "005"
zpad.character('X'); // change the character used for padding by calling zpad.character with a string
zpad.character();    // -> "X", returns the padding character with no arguments
zpad(5);             // -> "XX5"
zpad(5, 3, 'Z');     // -> "ZZ5", you can also pass custom pad character as third parameter

// .default and .character can also be chained, allowing you to define them when loading the module
var pad = require('zpad').default(4).character('Y');
pad(5);              // -> "YYYY5"
```

## Legalese

No Rights Reserved, *zpad* has been released under [CC0](http://creativecommons.org/publicdomain/zero/1.0/). As such, feel free to use it in any manner you want.
{'fraction_non_alphanumeric': 0.125311498754005, 'fraction_numerical': 0.018511925952296192, 'mean_word_length': 3.114202049780381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5023660', 'n_tokens_mistral': 854, 'n_tokens_neox': 811, 'n_words': 359}