<commit_before># EloquentJs client library
[![API docs](https://doc.esdoc.org/github.com/parsnick/eloquentjs-client/badge.svg)](https://doc.esdoc.org/github.com/parsnick/eloquentjs-client/)
[![Build Status](https://travis-ci.org/parsnick/eloquentjs-client.svg)](https://travis-ci.org/parsnick/eloquentjs-client)
[![Coverage Status](https://coveralls.io/repos/parsnick/eloquentjs-client/badge.svg?branch=master&service=github)](https://coveralls.io/github/parsnick/eloquentjs-client?branch=master)

This repo contains the javascript source for the EloquentJs project.
For more information about EloquentJs, see the [main eloquentjs repository](https://github.com/parsnick/eloquentjs).

## About

The EloquentJs package for Laravel, available via Composer, includes a pre-built copy of this library. If you just want to use EloquentJs, head over to the [eloquentjs repo](https://github.com/parsnick/eloquentjs).

If you want to contribute, view the source, or customise the build, carry on.

## Documentation

API documentation exists at [doc.esdoc.org/github.com/parsnick/eloquentjs-client](https://doc.esdoc.org/github.com/parsnick/eloquentjs-client/).

User-friendly documentation for usage of this library exists at [parsnick/eloquentjs](https://github.com/parsnick/eloquentjs).

## Integrating with eloquentjs

If you want to generate a custom build, install the library as an npm module:

```
npm install laravel-eloquentjs
```

You can then import the components you want directly into your own scripts. The build tasks (and others) are defined in the package.json "scripts", which you might need to refer to - nothing special though, just a standard browserify with the `babelify` transform.

### Why would you want to do this?

* You want to replace one or more components - perhaps you're using a framework that already provides certain features which you'd prefer to use (e.g. AJAX instead of the Fetch polyfill, an IoC container instead of the bundled Manager).
* You don't need all the functionality of EloquentJs and would rather create a partial build.
* You want to substantially change the core code.
* You need to add behaviours to models and prefer the ES2015 class sugar over the ES5-style

Note: there's no reason you can't customise the standard build by overwriting the prototypes, etc. but you might still prefer to create your own build for better code organisation, testing purposes, and/or a smaller build size.

## Contributing
All contributions welcome. For anything related to the companion PHP package, please use [parsnick/eloquentjs](https://github.com/parsnick/eloquentjs).

## License
MIT<commit_msg>Added ES6 class extends ... example<commit_after># EloquentJs client library
[![API docs](https://doc.esdoc.org/github.com/parsnick/eloquentjs-client/badge.svg)](https://doc.esdoc.org/github.com/parsnick/eloquentjs-client/)
[![Build Status](https://travis-ci.org/parsnick/eloquentjs-client.svg)](https://travis-ci.org/parsnick/eloquentjs-client)
[![Coverage Status](https://coveralls.io/repos/parsnick/eloquentjs-client/badge.svg?branch=master&service=github)](https://coveralls.io/github/parsnick/eloquentjs-client?branch=master)

This repo contains the javascript source for the EloquentJs project.
For more information about EloquentJs, see the [main eloquentjs repository](https://github.com/parsnick/eloquentjs).

## About

The EloquentJs package for Laravel, available via Composer, includes a pre-built copy of this library. If you just want to use EloquentJs, head over to the [eloquentjs repo](https://github.com/parsnick/eloquentjs).

If you want to contribute, view the source, or customise the build, carry on.

## Documentation

API documentation exists at [doc.esdoc.org/github.com/parsnick/eloquentjs-client](https://doc.esdoc.org/github.com/parsnick/eloquentjs-client/).

User-friendly documentation for usage of this library exists at [parsnick/eloquentjs](https://github.com/parsnick/eloquentjs).

## Integrating with eloquentjs

If you want to generate a custom build, install the library as an npm module:

```
npm install laravel-eloquentjs
```

You can then import the components you want directly into your own scripts. The build tasks (and others) are defined in the package.json "scripts", which you might need to refer to - nothing special though, just a standard browserify with the `babelify` transform.

##### Why would you want to do this?

* You want to replace one or more components - perhaps you're using a framework that already provides certain features which you'd prefer to use (e.g. AJAX instead of the Fetch polyfill, an IoC container instead of the bundled Manager).
* You don't need all the functionality of EloquentJs and would rather create a partial build.
* You want to substantially change the core code.
* You need to add behaviours to models and prefer the ES2015 class sugar over the ES5-style

Note: there's no reason you can't customise the standard build by overwriting the prototypes, etc. but you might still prefer to create your own build for better code organisation, testing purposes, and/or a smaller build size.

##### ES2015 example
```js
// models/Post.js
import { Model } from 'laravel-eloquentjs';

class Post extends Model {

    customBehaviour() {
        // do stuff
    }

}

export default Post;
```

## Contributing
All contributions welcome. For anything related to the companion PHP package, please use [parsnick/eloquentjs](https://github.com/parsnick/eloquentjs).

## License
MIT
{'fraction_non_alphanumeric': 0.09347667638483965, 'fraction_numerical': 0.0027332361516034984, 'mean_word_length': 4.870588235294117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 22, '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': '6752212', 'n_tokens_mistral': 1618, 'n_tokens_neox': 1540, 'n_words': 599}