11/**
22 * Copyright (c) 2011 Jeremy Ashkenas
3- *
3+ *
44 * Permission is hereby granted, free of charge, to any person
55 * obtaining a copy of this software and associated documentation
66 * files (the "Software"), to deal in the Software without
2424 */
2525
2626define ( function ( require , exports , module ) {
27-
27+ // Generated by CoffeeScript 1.2.1-pre
28+
2829 var extend , flatten ;
30+
2931 exports . starts = function ( string , literal , start ) {
3032 return literal === string . substr ( start , literal . length ) ;
3133 } ;
34+
3235 exports . ends = function ( string , literal , back ) {
3336 var len ;
3437 len = literal . length ;
3538 return literal === string . substr ( string . length - len - ( back || 0 ) , len ) ;
3639 } ;
40+
3741 exports . compact = function ( array ) {
3842 var item , _i , _len , _results ;
3943 _results = [ ] ;
4044 for ( _i = 0 , _len = array . length ; _i < _len ; _i ++ ) {
4145 item = array [ _i ] ;
42- if ( item ) {
43- _results . push ( item ) ;
44- }
46+ if ( item ) _results . push ( item ) ;
4547 }
4648 return _results ;
4749 } ;
50+
4851 exports . count = function ( string , substr ) {
4952 var num , pos ;
5053 num = pos = 0 ;
51- if ( ! substr . length ) {
52- return 1 / 0 ;
53- }
54+ if ( ! substr . length ) return 1 / 0 ;
5455 while ( pos = 1 + string . indexOf ( substr , pos ) ) {
5556 num ++ ;
5657 }
5758 return num ;
5859 } ;
60+
5961 exports . merge = function ( options , overrides ) {
6062 return extend ( extend ( { } , options ) , overrides ) ;
6163 } ;
64+
6265 extend = exports . extend = function ( object , properties ) {
6366 var key , val ;
6467 for ( key in properties ) {
@@ -67,6 +70,7 @@ define(function(require, exports, module) {
6770 }
6871 return object ;
6972 } ;
73+
7074 exports . flatten = flatten = function ( array ) {
7175 var element , flattened , _i , _len ;
7276 flattened = [ ] ;
@@ -80,13 +84,17 @@ define(function(require, exports, module) {
8084 }
8185 return flattened ;
8286 } ;
87+
8388 exports . del = function ( obj , key ) {
8489 var val ;
8590 val = obj [ key ] ;
8691 delete obj [ key ] ;
8792 return val ;
8893 } ;
94+
8995 exports . last = function ( array , back ) {
9096 return array [ array . length - ( back || 0 ) - 1 ] ;
9197 } ;
92- } ) ;
98+
99+
100+ } ) ;
0 commit comments