<commit_before>alfresco-jscript-extensions
===========================

[![Build Status](https://travis-ci.org/jgoldhammer/alfresco-jscript-extensions.svg?branch=master)](https://travis-ci.org/jgoldhammer/alfresco-jscript-extensions)

Alfresco repository module with helpful javascript root object extensions which are helpful in much scenarios.

Usage
--------

Add the dependencies to the Alfresco repository and share POM files of your WAR projects.

Alfresco SDK 2.x

    <dependencies>
      ...
      <dependency>
        <groupId>de.jgoldhammer</groupId>
        <artifactId>alfresco-jscript-extension</artifactId>
        <version>1.1</version>
        <type>amp</type>
      </dependency>
      ...
    </dependencies>

    <overlays>
      ...
      <overlay>
        <groupId>de.jgoldhammer</groupId>
        <artifactId>alfresco-jscript-extension</artifactId>
        <version>1.1</version>
        <type>amp</type>
      </overlay>
      ...
    </overlays>

Alfresco SDK 3.x

	<platformModules>
		<moduleDependency>
			<groupId>de.jgoldhammer</groupId>
	        	<artifactId>alfresco-jscript-extension</artifactId>
	        	<version>1.1</version>
	        	<type>amp</type>
        	</moduleDependency>
	</platformModules>
   
Following root objects are provided:
* **auth**
	* to change the authentication to another user during the javascript execution
	* to get the current executing authenticated user
	* example: tbd
		
* **batch** 
	* to provide a simple batch processing for javascript without any native functions
	* example: https://gist.github.com/jgoldhammer/6941273
	<commit_msg>docs(README): increase version number to 1.2 for maven dependency<commit_after>alfresco-jscript-extensions
===========================

[![Build Status](https://travis-ci.org/jgoldhammer/alfresco-jscript-extensions.svg?branch=master)](https://travis-ci.org/jgoldhammer/alfresco-jscript-extensions)

Alfresco repository module with helpful javascript root object extensions which are helpful in much scenarios.

Usage
--------

Add the dependencies to the Alfresco repository and share POM files of your WAR projects.

Alfresco SDK 2.x

    <dependencies>
      ...
      <dependency>
        <groupId>de.jgoldhammer</groupId>
        <artifactId>alfresco-jscript-extension</artifactId>
        <version>1.2</version>
        <type>amp</type>
      </dependency>
      ...
    </dependencies>

    <overlays>
      ...
      <overlay>
        <groupId>de.jgoldhammer</groupId>
        <artifactId>alfresco-jscript-extension</artifactId>
        <version>1.2</version>
        <type>amp</type>
      </overlay>
      ...
    </overlays>

Alfresco SDK 3.x

	<platformModules>
		<moduleDependency>
			<groupId>de.jgoldhammer</groupId>
	        	<artifactId>alfresco-jscript-extension</artifactId>
	        	<version>1.2</version>
	        	<type>amp</type>
        	</moduleDependency>
	</platformModules>
   
Following root objects are provided:
* **auth**
	* to change the authentication to another user during the javascript execution
	* to get the current executing authenticated user
	* example: tbd
		
* **batch** 
	* to provide a simple batch processing for javascript without any native functions
	* example: https://gist.github.com/jgoldhammer/6941273
	
{'fraction_non_alphanumeric': 0.13174019607843138, 'fraction_numerical': 0.00980392156862745, 'mean_word_length': 3.091478696741855, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, 'https://': 6, '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': '272851', 'n_tokens_mistral': 1063, 'n_tokens_neox': 952, 'n_words': 218}