UNPKG

@extra-array/split.min

Version:

Breaks array considering test as separator.

1 lines 930 B
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).array_split=e()}}(function(){return function(){return function e(n,r,t){function o(i,u){if(!r[i]){if(!n[i]){var d="function"==typeof require&&require;if(!u&&d)return d(i,!0);if(f)return f(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var s=r[i]={exports:{}};n[i][0].call(s.exports,function(e){return o(n[i][1][e]||e)},s,s.exports,e,n,r,t)}return r[i].exports}for(var f="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}}()({1:[function(e,n,r){"use strict";n.exports=function(e,n){var r=[],t=[],o=-1;for(var f of e)n(f,++o,e)?t.length&&(r.push(t),t=[]):t.push(f);return t.length&&r.push(t),r}},{}]},{},[1])(1)});