<commit_before>EasifyJS
===============

A small library that makes JavaScript easier to work with.

---------------

##CONTRIBUTE

[How to contribute.](CONTRIBUTE.md)


##DOCUMENTATION

To get started, include Easify.min.js in your website. Make sure it's included above your websites JS file. To make sure JS doesn't interfere with the loading of your HTML and CSS, it is suggested that you add your JS files right above your closing `body` tag.

```html
    <script src="js/Easify.min.js"></script>
    <script src="js/app.js"></script>
  </body>
</html>
```

You'll know it's included if you look in the console and see 'Easify loaded!'

Once included, you'll need to initialize an Easify object. There are 2 ways to do this:

```javascript
// The long hand version
var e = Easify();

// The preferred method
var e = $E();

// Will be using the 'e' variable for the rest of this section
````

Now you can access all of the Easify methods by using dot notation.

####String Methods

***capitalize***

Used to capitalize the first letter of a provided string.

```javascript
e.capitalize('john'); // > "John"
```

***isString***

Used to check if the provided value is of type 'string'.

```javascript
e.isString('hello world'); // > true
e.isString(33); // > false
```

***last***

Used to get the last letter of a string.

```javascript
e.last('hello world'); // > "d"
```

***remove***

Used to remove a specified amount of random letters from a provided string.

```javascript
e.remove('hello world', 4); // > "hell od"
e.remove('hello world', 4); // > "heloorl"
```

***removeAll***

Used to remove all instances of a specified letter from a provided string.

```javascript
e.removeAll('hello world', 'l'); // > "heo word"
```

***randomize***

Used to randomly sort the letters in a provided string.

```javascript
e.randomize('hello world'); // > "lrdlwloeho "
e.randomize('hello world'); // > "roheodlw ll"
```

***repeat***

Used to repeate a provided string, a specified amount of times. Also trims off white space from the beginning and end.

```javascript
e.repeat('John ', 3); // > "<NAME>";
```

***reverse***

Used to reverse the order of a string.

```javascript
e.reverse('hello world'); // > "dlrow olleh"
```

***wrap***

Used to wrap a provided string inside of a provided HTML element.

```javascript
e.wrap('hello world', 'h1'); // > "<h1>hello world</h1>"
```


####ARRAY METHODS

***checkTypes***

Used to check the types of all values contained in a passed in array

```javascript
e.checkTypes([{}, [], 'hello', 3, function(){}, true]); // > ["object", "array", "string", "number", "function", "boolean"]
```

***contains***

Used to check if a specific value is inside of an array

```javascript
e.contains([1,2,3], 4); // > false
e.contains([1,2,3], 2); // > true
```

***isArray***

Used to check if passed in value is an array

```javascript
e.isArray([]); // > true
e.isArray({}); // > false
e.isArray('hello'); // > false
```


####OBJECT METHODS

***isObject***

Used to check if passed in value is an object

```javascript
e.isObject({}); // > true
e.isObject([]); // > false
e.isObject(4); // > false
```

***rename***

Changes the name of the specified property name of an object

```javascript
var person = {firstname: 'John'};
e.rename(person, 'firstname', 'name'); // > {name: 'John'}
```

***toArray***

Converts an object into an array of arrays containing the key and value<commit_msg>added method names that still need to be filled in<commit_after>EasifyJS
===============

A small library that makes JavaScript easier to work with.

---------------

##CONTRIBUTE

[How to contribute.](CONTRIBUTE.md)


##DOCUMENTATION

To get started, include Easify.min.js in your website. Make sure it's included above your websites JS file. To make sure JS doesn't interfere with the loading of your HTML and CSS, it is suggested that you add your JS files right above your closing `body` tag.

```html
    <script src="js/Easify.min.js"></script>
    <script src="js/app.js"></script>
  </body>
</html>
```

You'll know it's included if you look in the console and see 'Easify loaded!'

Once included, you'll need to initialize an Easify object. There are 2 ways to do this:

```javascript
// The long hand version
var e = Easify();

// The preferred method
var e = $E();

// Will be using the 'e' variable for the rest of this section
````

Now you can access all of the Easify methods by using dot notation.

####String Methods

***capitalize***

Used to capitalize the first letter of a provided string.

```javascript
e.capitalize('john'); // > "John"
```

***isString***

Used to check if the provided value is of type 'string'.

```javascript
e.isString('hello world'); // > true
e.isString(33); // > false
```

***last***

Used to get the last letter of a string.

```javascript
e.last('hello world'); // > "d"
```

***remove***

Used to remove a specified amount of random letters from a provided string.

```javascript
e.remove('hello world', 4); // > "hell od"
e.remove('hello world', 4); // > "heloorl"
```

***removeAll***

Used to remove all instances of a specified letter from a provided string.

```javascript
e.removeAll('hello world', 'l'); // > "heo word"
```

***randomize***

Used to randomly sort the letters in a provided string.

```javascript
e.randomize('hello world'); // > "lrdlwloeho "
e.randomize('hello world'); // > "roheodlw ll"
```

***repeat***

Used to repeate a provided string, a specified amount of times. Also trims off white space from the beginning and end.

```javascript
e.repeat('John ', 3); // > "<NAME>";
```

***reverse***

Used to reverse the order of a string.

```javascript
e.reverse('hello world'); // > "dlrow olleh"
```

***trim***

***wrap***

Used to wrap a provided string inside of a provided HTML element.

```javascript
e.wrap('hello world', 'h1'); // > "<h1>hello world</h1>"
```


####ARRAY METHODS

***bridge***

***checkTypes***

Used to check the types of all values contained in a passed in array

```javascript
e.checkTypes([{}, [], 'hello', 3, function(){}, true]); // > ["object", "array", "string", "number", "function", "boolean"]
```

***contains***

Used to check if a specific value is inside of an array

```javascript
e.contains([1,2,3], 4); // > false
e.contains([1,2,3], 2); // > true
```

***isArray***

Used to check if passed in value is an array

```javascript
e.isArray([]); // > true
e.isArray({}); // > false
e.isArray('hello'); // > false
```

***parlay***

***removeItem***

***shuffle***


####OBJECT METHODS

***combine***

***drop***

***isObject***

Used to check if passed in value is an object

```javascript
e.isObject({}); // > true
e.isObject([]); // > false
e.isObject(4); // > false
```

***maintain***

***objectPush***

***rename***

Changes the name of the specified property name of an object

```javascript
var person = {firstname: 'John'};
e.rename(person, 'firstname', 'name'); // > {name: 'John'}
```

***toArray***

Converts an object into an array of arrays containing the key and value
{'fraction_non_alphanumeric': 0.18073146435178597, 'fraction_numerical': 0.005407713106588871, 'mean_word_length': 3.9843971631205672, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 65, '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': '5117284', 'n_tokens_mistral': 2272, 'n_tokens_neox': 2152, 'n_words': 879}