Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .eslintrc.json

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ npm install eol --save
### `require` or `import`

```js
const eol = require('eol')
const eol = require("eol")
```

```js
import eol from 'eol'
import eol from "eol"
```

## API
Expand Down Expand Up @@ -71,8 +71,8 @@ eol.split(text).slice(-3).join(eol.auto) // last 3 lines joined
Detect or inspect via match

```js
eol.match(' ') // []
eol.match('world\nwide\nweb') // ['\n','\n']
eol.match(" ") // []
eol.match("world\nwide\nweb") // ["\n","\n"]
```

### Dubbing
Expand Down
26 changes: 13 additions & 13 deletions eol.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
!function(root, name, make) {
if (typeof module != 'undefined' && module.exports) module.exports = make()
if (typeof module != "undefined" && module.exports) module.exports = make()
else root[name] = make()
}(this, 'eol', function() {
}(this, "eol", function() {

var api = {}
var isWindows = typeof process != 'undefined' && 'win32' === process.platform
var linebreak = isWindows ? '\r\n' : '\n'
var isWindows = typeof process != "undefined" && "win32" === process.platform
var linebreak = isWindows ? "\r\n" : "\n"
var newline = /\r\n|\r|\n/g

function before(text) {
Expand Down Expand Up @@ -34,14 +34,14 @@
return text.split(newline)
}

api['lf'] = dub('\n')
api['cr'] = dub('\r')
api['crlf'] = dub('\r\n')
api['auto'] = dub(linebreak)
api['before'] = before
api['after'] = after
api['match'] = match
api['split'] = split
api['dub'] = dub
api["lf"] = dub("\n")
api["cr"] = dub("\r")
api["crlf"] = dub("\r\n")
api["auto"] = dub(linebreak)
api["before"] = before
api["after"] = after
api["match"] = match
api["split"] = split
api["dub"] = dub
return api
});
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
rules: {
"indent": ["error", 2],
"quotes": ["error", "double"]
}
}
Loading