A micro-library that contains snippets of code useful for modifying strings and arrays. While it does modify the native prototype of String and Array, it does so with non-enumerable methods.
Returns a formatted string.
Character | Type |
---|---|
s | String |
i | Integer |
d | Digit |
f | Float |
'rgba(%i, %i, %i, %f)'.format(255, 0, 0, 0.5);
'Hello %s'.format('World!');
Split an array into smaller chunks.
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].chunk(2);