projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Version 1
[yaffs-website]
/
node_modules
/
underscore.string
/
chop.js
diff --git a/node_modules/underscore.string/chop.js
b/node_modules/underscore.string/chop.js
new file mode 100644
(file)
index 0000000..
73e17eb
--- /dev/null
+++ b/
node_modules/underscore.string/chop.js
@@ -0,0
+1,6
@@
+module.exports = function chop(str, step) {
+ if (str == null) return [];
+ str = String(str);
+ step = ~~step;
+ return step > 0 ? str.match(new RegExp('.{1,' + step + '}', 'g')) : [str];
+};