JSPM

@jswork/next-splitlines

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q24943F
  • License MIT

Split string by ` ` or ` ` or ` ` for next.

Package Exports

  • @jswork/next-splitlines

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jswork/next-splitlines) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.