Skip to content

Commit 9cb52e6

Browse files
committed
v1.0.0
1 parent c4545f0 commit 9cb52e6

File tree

9 files changed

+214
-233
lines changed

9 files changed

+214
-233
lines changed

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "nodemailer"
3+
}

.jshintrc

Lines changed: 0 additions & 17 deletions
This file was deleted.

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
language: node_js
22
node_js:
3-
- "0.10"
4-
- "0.11"
3+
- 6
4+
- 8
5+
- 9
56
before_install:
67
- npm install -g grunt-cli
78
notifications:
89
email:
9-
10+

Gruntfile.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
module.exports = function(grunt) {
2-
'use strict';
1+
'use strict';
32

3+
module.exports = function(grunt) {
44
// Project configuration.
55
grunt.initConfig({
6-
jshint: {
7-
all: ['*.js', 'src/*.js', 'test/*.js'],
8-
options: {
9-
jshintrc: '.jshintrc'
10-
}
6+
eslint: {
7+
all: ['lib/**/*.js', 'test/**/*.js', 'Gruntfile.js']
118
},
129

1310
mochaTest: {
@@ -21,9 +18,9 @@ module.exports = function(grunt) {
2118
});
2219

2320
// Load the plugin(s)
24-
grunt.loadNpmTasks('grunt-contrib-jshint');
21+
grunt.loadNpmTasks('grunt-eslint');
2522
grunt.loadNpmTasks('grunt-mocha-test');
2623

2724
// Tasks
28-
grunt.registerTask('default', ['jshint', 'mochaTest']);
29-
};
25+
grunt.registerTask('default', ['eslint', 'mochaTest']);
26+
};

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014 Andris Reinman
1+
Copyright (c) 2014-2017 Andris Reinman
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install with npm
1111
Require in your script
1212

1313
```javascript
14-
var libbase64 = require('libbase64');
14+
const libbase64 = require('libbase64');
1515
```
1616

1717
### Encode values
@@ -22,7 +22,7 @@ Encode Buffer objects or unicode strings with
2222

2323
Where
2424

25-
* **val** is a Buffer or an unicode string
25+
* **val** is a Buffer or an unicode string
2626

2727
**Example**
2828

@@ -39,13 +39,13 @@ To enforce soft line breaks on lines longer than selected amount of characters,
3939

4040
Where
4141

42-
* **str** is a base64 encoded string
43-
* **lineLength** (defaults to 76) is the maximum allowed line length
42+
* **str** is a base64 encoded string
43+
* **lineLength** (defaults to 76) is the maximum allowed line length
4444

4545
**Example**
4646

4747
```javascript
48-
libbase64.wrap('asO1Z2V2asO1Z2V2asO1Z2V2YQ==', 10)
48+
libbase64.wrap('asO1Z2V2asO1Z2V2asO1Z2V2YQ==', 10);
4949
// asO1Z2V2as\r\n
5050
// O1Z2V2asO1\r\n
5151
// Z2V2YQ==
@@ -59,22 +59,23 @@ libbase64.wrap('asO1Z2V2asO1Z2V2asO1Z2V2YQ==', 10)
5959

6060
Create new Encoder Stream with
6161

62-
var encoder = new libbase64.Encoder([options])
62+
const encoder = new libbase64.Encoder([options])
6363

6464
Where
6565

66-
* **options** is the optional stream options object with an additional option `lineLength` if you want to use any other line length than the default 76 characters (or set to `false` to turn the soft wrapping off completely)
66+
* **options** is the optional stream options object with an additional option `lineLength` if you want to use any other line length than the default 76
67+
characters (or set to `false` to turn the soft wrapping off completely)
6768

6869
**Example**
6970

7071
The following example script reads in a file, encodes it to base64 and saves the output to a file.
7172

7273
```javascript
73-
var libbase64 = require('libbase64');
74-
var fs = require('fs');
75-
var source = fs.createReadStream('source.txt');
76-
var encoded = fs.createReadStream('encoded.txt');
77-
var encoder = new libbase64.Encoder();
74+
const libbase64 = require('libbase64');
75+
const fs = require('fs');
76+
const source = fs.createReadStream('source.txt');
77+
const encoded = fs.createReadStream('encoded.txt');
78+
const encoder = new libbase64.Encoder();
7879

7980
source.pipe(encoder).pipe(encoded);
8081
```
@@ -83,26 +84,26 @@ source.pipe(encoder).pipe(encoded);
8384

8485
Create new Decoder Stream with
8586

86-
var decoder = new libbase64.Decoder([options])
87+
const decoder = new libbase64.Decoder([options])
8788

8889
Where
8990

90-
* **options** is the optional stream options object
91+
* **options** is the optional stream options object
9192

9293
**Example**
9394

9495
The following example script reads in a file in base64 encoding, decodes it and saves the output to a file.
9596

9697
```javascript
97-
var libbase64 = require('libbase64');
98-
var fs = require('fs');
99-
var encoded = fs.createReadStream('encoded.txt');
100-
var dest = fs.createReadStream('dest.txt');
101-
var decoder = new libbase64.Decoder();
98+
const libbase64 = require('libbase64');
99+
const fs = require('fs');
100+
const encoded = fs.createReadStream('encoded.txt');
101+
const dest = fs.createReadStream('dest.txt');
102+
const decoder = new libbase64.Decoder();
102103

103104
encoded.pipe(decoder).pipe(dest);
104105
```
105106

106107
## License
107108

108-
**MIT**
109+
**MIT**

0 commit comments

Comments
 (0)