-
Notifications
You must be signed in to change notification settings - Fork 61
/
wade.min.js
6 lines (6 loc) · 1.58 KB
/
wade.min.js
1
2
3
4
5
6
/**
* Wade v0.2.0
* Copyright 2017 Kabir Shah
* Released under the MIT License
*/
!function(e,t){"object"==typeof module&&module.exports?module.exports=t():e.Wade=t()}(this,function(){var e=["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","see","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"],t=/\.|\,|\!/g,o=function(e){return e.toLowerCase()},n=function(e){return e.replace(t,"")},r=function(t){for(var o=t.split(" "),n=0;n<o.length;n++)-1!==e.indexOf(o[n])&&o.splice(n,1);return o},h=function(e){for(var t=function(e){t.data.length,h.process(e).split(" ").length;return[]},o=0;o<e.length;o++)e[o]=h.process(e[o]);return t.index=h.index(e),t.data=e,t};return h.pipeline=[o,n,r],h.process=function(e){for(var t=h.pipeline,o=0;o<t.length;o++)e=t[o](e);return e},h.index=function(e){for(var t={},o=0;o<e.length;o++)for(var n=e[o],r=0;r<n.length;r++){for(var h=h[r],a=h.length-1,i=t,u=0;u<a;u++){var s=h[u],l=i[s];l=void 0===l?{}:l,i[s]=l}i[h[a]]={id:o}}return t},h.version="0.2.0",h});