<commit_before><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>primish - a mootools prime fork for the browser</title>
	<link href="css/doctor.css" type="text/css" rel="stylesheet">
	
</head>
<body>

<a id="github-ribbon" href="https://github.com/DimitarChristoff/primish"><img alt="Fork me on GitHub" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>

<div id="nav">
	<div class="separator"></div>
	<a title="primish - a mootools prime fork for the browser" class="brand" href="#" style="background-image:url(images/primish.png)"></a>
	<div class="separator"></div>
	
		<div class="twitter extra">

			<iframe allowtransparency="true" frameborder="0" scrolling="no" style="width: 162px; height: 20px;" src="https://platform.twitter.com/widgets/follow_button.html?screen_name=D_mitar&amp;show_count=false"></iframe>
		</div>
		<div class="separator"></div>
	
	<ul id="sections"><li class="l2"><a href="#differences">Differences</a><ul><li class="l3"><a href="#differences/prime-changes">prime changes</a></li><li class="l3"><a href="#differences/emitter-changes">emitter changes</a></li><li class="l3"><a href="#differences/options">options</a></li><li class="l3"><a href="#differences/browser-support">Browser support</a></li><li class="l3"><a href="#differences/size-and-download">Size and download</a></li><li class="l3"><a href="#differences/changelog">Changelog</a></li></ul></li><li class="l2"><a href="#testimonials">Testimonials</a></li><li class="l2"><a href="#creating-a-class">Creating a Class</a><ul><li class="l3"><a href="#creating-a-class/constructor">constructor</a></li><li class="l3"><a href="#creating-a-class/extend">extend</a></li><li class="l3"><a href="#creating-a-class/implement">implement</a></li><li class="l3"><a href="#creating-a-class/parent">parent</a></li></ul></li><li class="l2"><a href="#define">Define</a></li><li class="l2"><a href="#plugins">Plugins</a><ul><li class="l3"><a href="#plugins/emitter">emitter</a></li><li class="l3"><a href="#plugins/options">options</a></li></ul></li><li class="l2"><a href="#contributing">contributing</a></li><li class="l2"><a href="#npm-usage">npm usage</a></li><li class="l2"><a href="#bower-usage">bower usage</a></li><li class="l2"><a href="#requirejs-usage">RequireJS usage</a></li><li class="l2"><a href="#license">License</a></li></ul>
	<div class="separator"></div>
	
		<div class="extra" id="github">
			<a href="https://github.com/DimitarChristoff/primish">Source on Github</a>
		</div>
		<div class="extra" id="github-issues">
			<a href="https://github.com/DimitarChristoff/primish/issues">Issues</a>
		</div>
	
	
		<div class="separator"></div>
		<div class="extra" id="github">
			<a href="http://travis-ci.org/DimitarChristoff/primish" class="travis">
				<img src="http://travis-ci.org/DimitarChristoff/primish.png?branch=master"></a>
		</div>

	
	<div class="extra generated">
		Generated by <a href="https://github.com/DimitarChristoff/doctor" target="_blank" title="generate documentation from markdown">Doctor, MD</a>
	</div>
</div>
<div id="content" class="container">
	<h1 id="primish">primish</h1>
<p>A prime derivative that went beyond repair. Initially a fork of <a href="https://github.com/mootools/prime/">MooTools prime</a>, now with a lot of sugar. </p>
<p>Why fork prime in the first place? Well... prime is very good. But it is written as a CommonJS module and it needs a fair amount of packaging and bundling of plugins and behaviours in order to make it work in a browser. Having to repeat these tasks for every project became repetitive and tedious after a while, hence this mini release. It does not only do module packaging, there are some small changes in code.</p>
<h2 id="differences">Differences</h2>
<h3 id="differences/prime-changes">prime changes</h3>
<ul>
<li>forked from before the new prime <a href="https://github.com/mootools/prime/blob/master/index.js#L6-L11">types and object mixins</a>.</li>
<li><code>.parent()</code></li>
<li><code>.implement()</code> and <code>implement</code> mutator, like mootools. not <code>mixin</code></li>
<li><code>extend</code>, not <code>inherits</code></li>
<li><code>prime.merge()</code> shallow Object merging</li>
<li>object keys of constructor object are NOT dereferenced / cloned</li>
<li>only <code>options</code> key is merged with supers, not other objects</li>
<li>extras from prime like utils, shell, type, etc have all been removed, recommended util library is <code>lodash</code></li>
<li>primish classes can have IDs for reflection like in AMD.</li>
</ul>
<h3 id="differences/emitter-changes">emitter changes</h3>
<ul>
<li><code>.emit</code> is actually <code>.trigger</code>, so it&#39;s not an <code>emitter</code> as such :)</li>
<li>no support for defered async events (see <a href="https://github.com/mootools/prime/blob/master/emitter.js#L50-L65">this</a>)</li>
<li>support for event stacking like <code>.on(&#39;foo bar baz&#39;, function(){});</code></li>
<li>support for event pseudos like <code>.on(&#39;foo:once&#39;, function(){});</code></li>
<li><code>emitter.definePseudo()</code> to allow custom pseudo events</li>
</ul>
<h3 id="differences/options">options</h3>
<ul>
<li><code>.setOptions()</code> - shallow merging of object with <code>this.options</code></li>
<li>support for emitter events via <code>onEventname</code> -&gt; <code>this.on(&#39;eventname&#39;)</code> like in MooTools 1.x</li>
</ul>
<h3 id="differences/browser-support">Browser support</h3>
<p>The main driving force behind primish is to change prime to work in a browser out of the box as well as under nodejs.
This fork changes the code to work via an UMD wrap w/o any dependencies, so it supports AMD (eg. RequireJS, Almond) as
well as simple browser exports to gloabls. If you don&#39;t have an AMD loader and not under NodeJS / browserify, it will
export <code>window.primish</code>, <code>window.emitter</code> and <code>window.options</code>, so be careful. Another goal has been to bring as much
MooTools 1.x sugar into classes as possible.</p>
<h3 id="differences/size-and-download">Size and download</h3>
<p>The minified packaged version weighs just 4.2K without gzipping, so a tiny footprint in any codebase.</p>
<p><a class="btn btn-large btn-primary" rel="download" target="_blank" href="./js/primish/primish-min.js">primish-min.js (4.2k)</a></p>
<h3 id="differences/changelog">Changelog</h3>
<ul>
<li>0.3.3 requirejs 2.1.10 compatible bundles support via module ids</li>
<li>0.3.2 requirejs uglify2 build</li>
</ul>
<h2 id="testimonials">Testimonials</h2>
<p><a href="https://github.com/kentaromiura">kentaromiura</a>, mootools-core and mootools-prime developer said:</p>
<blockquote>
<p><em>I guess that when you said I&#39;ll go and make my own version of prime with, blackjack and hookers you really meant it</em></p><commit_msg>rebuilt docs<commit_after><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>primish - a mootools prime fork for the browser</title>
	<link href="css/doctor.css" type="text/css" rel="stylesheet">
	
</head>
<body>

<a id="github-ribbon" href="https://github.com/DimitarChristoff/primish"><img alt="Fork me on GitHub" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>

<div id="nav">
	<div class="separator"></div>
	<a title="primish - a mootools prime fork for the browser" class="brand" href="#" style="background-image:url(images/primish.png)"></a>
	<div class="separator"></div>
	
		<div class="twitter extra">

			<iframe allowtransparency="true" frameborder="0" scrolling="no" style="width: 162px; height: 20px;" src="https://platform.twitter.com/widgets/follow_button.html?screen_name=D_mitar&amp;show_count=false"></iframe>
		</div>
		<div class="separator"></div>
	
	<ul id="sections"><li class="l2"><a href="#differences">Differences</a><ul><li class="l3"><a href="#differences/prime-changes">prime changes</a></li><li class="l3"><a href="#differences/emitter-changes">emitter changes</a></li><li class="l3"><a href="#differences/options">options</a></li><li class="l3"><a href="#differences/browser-support">Browser support</a></li><li class="l3"><a href="#differences/size-and-download">Size and download</a></li><li class="l3"><a href="#differences/changelog">Changelog</a></li></ul></li><li class="l2"><a href="#testimonials">Testimonials</a></li><li class="l2"><a href="#creating-a-class">Creating a Class</a><ul><li class="l3"><a href="#creating-a-class/constructor">constructor</a></li><li class="l3"><a href="#creating-a-class/extend">extend</a></li><li class="l3"><a href="#creating-a-class/implement">implement</a></li><li class="l3"><a href="#creating-a-class/parent">parent</a></li></ul></li><li class="l2"><a href="#define">Define</a></li><li class="l2"><a href="#plugins">Plugins</a><ul><li class="l3"><a href="#plugins/emitter">emitter</a></li><li class="l3"><a href="#plugins/options">options</a></li></ul></li><li class="l2"><a href="#contributing">contributing</a></li><li class="l2"><a href="#npm-usage">npm usage</a></li><li class="l2"><a href="#bower-usage">bower usage</a></li><li class="l2"><a href="#requirejs-usage">RequireJS usage</a></li><li class="l2"><a href="#license">License</a></li></ul>
	<div class="separator"></div>
	
		<div class="extra" id="github">
			<a href="https://github.com/DimitarChristoff/primish">Source on Github</a>
		</div>
		<div class="extra" id="github-issues">
			<a href="https://github.com/DimitarChristoff/primish/issues">Issues</a>
		</div>
	
	
		<div class="separator"></div>
		<div class="extra" id="github">
			<a href="http://travis-ci.org/DimitarChristoff/primish" class="travis">
				<img src="http://travis-ci.org/DimitarChristoff/primish.png?branch=master"></a>
		</div>

	
	<div class="extra generated">
		Generated by <a href="https://github.com/DimitarChristoff/doctor" target="_blank" title="generate documentation from markdown">Doctor, MD</a>
	</div>
</div>
<div id="content" class="container">
	<h1 id="primish">primish</h1>
<p>A prime derivative that went beyond repair. Initially a fork of <a href="https://github.com/mootools/prime/">MooTools prime</a>, now with a lot of sugar. </p>
<p>Why fork prime in the first place? Well... prime is very good. But it is written as a CommonJS module and it needs a fair amount of packaging and bundling of plugins and behaviours in order to make it work in a browser. Having to repeat these tasks for every project became repetitive and tedious after a while, hence this mini release. It does not only do module packaging, there are some small changes in code.</p>
<h2 id="differences">Differences</h2>
<h3 id="differences/prime-changes">prime changes</h3>
<ul>
<li>forked from before the new prime <a href="https://github.com/mootools/prime/blob/master/index.js#L6-L11">types and object mixins</a>.</li>
<li><code>.parent()</code></li>
<li><code>.implement()</code> and <code>implement</code> mutator, like mootools. not <code>mixin</code></li>
<li><code>extend</code>, not <code>inherits</code></li>
<li><code>prime.merge()</code> shallow Object merging</li>
<li>object keys of constructor object are NOT dereferenced / cloned</li>
<li>only <code>options</code> key is merged with supers, not other objects</li>
<li>extras from prime like utils, shell, type, etc have all been removed, recommended util library is <code>lodash</code></li>
<li>primish classes can have IDs for reflection like in AMD.</li>
</ul>
<h3 id="differences/emitter-changes">emitter changes</h3>
<ul>
<li><code>.emit</code> is actually <code>.trigger</code>, so it&#39;s not an <code>emitter</code> as such :)</li>
<li>no support for defered async events (see <a href="https://github.com/mootools/prime/blob/master/emitter.js#L50-L65">this</a>)</li>
<li>support for event stacking like <code>.on(&#39;foo bar baz&#39;, function(){});</code></li>
<li>support for event pseudos like <code>.on(&#39;foo:once&#39;, function(){});</code></li>
<li><code>emitter.definePseudo()</code> to allow custom pseudo events</li>
</ul>
<h3 id="differences/options">options</h3>
<ul>
<li><code>.setOptions()</code> - shallow merging of object with <code>this.options</code></li>
<li>support for emitter events via <code>onEventname</code> -&gt; <code>this.on(&#39;eventname&#39;)</code> like in MooTools 1.x</li>
</ul>
<h3 id="differences/browser-support">Browser support</h3>
<p>The main driving force behind primish is to change prime to work in a browser out of the box as well as under nodejs.
This fork changes the code to work via an UMD wrap w/o any dependencies, so it supports AMD (eg. RequireJS, Almond) as
well as simple browser exports to globals. If you don&#39;t have an AMD loader and not under NodeJS / browserify, it will
export <code>window.primish</code>, <code>window.emitter</code> and <code>window.options</code>, so be careful. Another goal has been to bring as much
MooTools 1.x sugar into classes as possible.</p>
<h3 id="differences/size-and-download">Size and download</h3>
<p>The minified packaged version weighs just 4.2K without gzipping, so a tiny footprint in any codebase.</p>
<p><a class="btn btn-large btn-primary" rel="download" target="_blank" href="./js/primish/primish-min.js">primish-min.js (4.2k)</a></p>
<h3 id="differences/changelog">Changelog</h3>
<ul>
<li>0.3.3 requirejs 2.1.10 compatible bundles support via module ids</li>
<li>0.3.2 requirejs uglify2 build</li>
</ul>
<h2 id="testimonials">Testimonials</h2>
<p><a href="https://github.com/kentaromiura">kentaromiura</a>, mootools-core and mootools-prime developer said:</p>
<blockquote>
<p><em>I guess that when you said I&#39;ll go and make my own version of prime with, blackjack and hookers you really meant it</em></p>
{'fraction_non_alphanumeric': 0.19425984079456657, 'fraction_numerical': 0.014021762944570219, 'mean_word_length': 5.993871297242084, 'pattern_counts': {'":': 0, '<': 557, '<?xml version=': 0, '>': 557, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2044489', 'n_tokens_mistral': 4810, 'n_tokens_neox': 4542, 'n_words': 1166}