Closed ajoslin closed 8 years ago
Great work, @ajoslin! String-wise operations will be great to have. :heart:
@noffle what is your stance on type-assertions? I usually include assert
in my modules and use it for type-checking.
The idea is that if one or more of the frontend modules I have in my project use assert
, then they all may as well use it -- same byte usage.
In this case, I'm thinking of count
: checking if it's a non-negative number.
I've committed without assertions for now.
:+1: on these revisions, and :+1: for type assertions, if you'd like to include them in this PR.
Type assertions added to insert
and delete
:+1:
Great! Just one nitpick on asserting on the done
callback and we're good to merge.
Excellent -- LGTM! :star2:
🎉
Breaking change: The callbacks of both
str.insert
andstr.delete
now accept an array of ops.(err, op)
(err, arrayOfOps)
I also added a gitignore for node_modules, standard.js linting (you seem to already follow standardjs anyway), updated the docs to reflect changes, and removed the outdated example file.