slate-edit-code
Version:
A Slate plugin to handle keyboard events in code blocks.
16 lines (13 loc) • 340 B
JavaScript
;
var Immutable = require('immutable');
var getNewLine = require('./getNewLine');
/**
* Return a list of line in this text
* @param {String} text
* @param {String} sep?
* @return {List<String>}
*/
function getLines(text, sep) {
return Immutable.List(text.split(sep || getNewLine(text)));
}
module.exports = getLines;