@jswork/next-splitlines

1.0.1 • Public • Published

next-splitlines

Split string by \r\n or \n or \r for next.

version license size download

installation

npm install -S @jswork/next-splitlines

usage

import '@jswork/next-splitlines';

const str = `1
00:00:03,776 --> 00:00:09,152
Technology trends may push Silicon Valley back to the future.

2
00:00:09,152 --> 00:00:19,009
Carver Mead, a pioneer in integrated circuits and a professor of computer science at the California Institute of Technology,

3
00:00:19,009 --> 00:00:33,473
notes there are now work-stations that enable engineers to design, test and produce chips right on their desks, much the way an editor creates a newsletter on a Macintosh.

`;

const liens = nx.splitlines(str);

/*
[
  '1',
  '00:00:03,776 --> 00:00:09,152',
  'Technology trends may push Silicon Valley back to the future.',
  '',
  '2',
  '00:00:09,152 --> 00:00:19,009',
  'Carver Mead, a pioneer in integrated circuits and a professor of computer science at the California Institute of Technology,',
  '',
  '3',
  '00:00:19,009 --> 00:00:33,473',
  'notes there are now work-stations that enable engineers to design, test and produce chips right on their desks, much the way an editor creates a newsletter on a Macintosh.',
  '',
  ''
];
*/

resources

license

Code released under the MIT license.

Package Sidebar

Install

npm i @jswork/next-splitlines

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

5.59 kB

Total Files

5

Last publish

Collaborators

  • afeiship