Nefarious Planetary Meddling
    Wondering what’s next for npm?Check out our public roadmap! »

    string-segment

    0.0.2 • Public • Published

    string-segment Build Status

    Split a string into an array of substrings, each length characters long.

    Install

    npm install string-segment

    Usage

    var stringSegment = require("string-segment");
     
    stringSegment(3, "1234567890"); //=> ["123", "456", "789", "0"]

    Note: this module supports currying.

    var segmentBy5 = stringSegment(5);
     
    segmentBy5("1234567890"); //=> ["12345", "67890"]

    Install

    npm i string-segment

    DownloadsWeekly Downloads

    4

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • avatar