Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eol

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eol - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

14

eol.js

@@ -8,4 +8,13 @@ !function(root, name, make) {

var isWindows = typeof process != 'undefined' && 'win32' === process.platform
var linebreak = isWindows ? '\r\n' : '\n'
var newline = /\r\n|\r|\n/g
function before(text) {
return linebreak + text
}
function after(text) {
return text + linebreak
}
function converts(to) {

@@ -20,5 +29,6 @@ return function(text) {

api['crlf'] = converts('\r\n')
api['auto'] = converts(isWindows ? '\r\n' : '\n')
api['auto'] = converts(linebreak)
api['before'] = before
api['after'] = after
return api
});

2

package.json
{
"name": "eol",
"description": "Newline character converter",
"version": "0.3.0",
"version": "0.4.0",
"homepage": "https://github.com/ryanve/eol",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -30,3 +30,11 @@ # eol

### `eol.before(text)`
- Add linebreak before <var>text</var>
- <b>@return</b> string with linebreak added before text
### `eol.after(text)`
- Add linebreak after <var>text</var>
- <b>@return</b> string with linebreak added after text
## License
MIT

@@ -42,3 +42,8 @@ !function(root) {

aok('before', eol.lf(eol.before('text')) === '\ntext')
aok('before2', eol.lf(eol.before('\ntext\n')) === '\n\ntext\n')
aok('after', eol.lf(eol.after('text')) === 'text\n')
aok('after2', eol.lf(eol.after('\ntext\n')) === '\ntext\n\n')
aok.log('All tests passed =)')
}(this);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc