Skip to content

Commit 44accca

Browse files
authored
Merge pull request #2 from soyuka/fix-ci
attempt ci
2 parents e670fee + 044b3f6 commit 44accca

File tree

12 files changed

+2971
-207
lines changed

12 files changed

+2971
-207
lines changed

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
language: node_js
22
addons:
3-
chrome: stable
4-
apt:
5-
packages:
3+
apt:
4+
packages:
65
- xvfb
76
os:
87
- linux
98
before_install:
10-
- npm install browser-run browserify -g
11-
- export DISPLAY=':99.0'
12-
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
9+
- export DISPLAY=':99.0'
10+
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
1311
node_js:
14-
- "8"
12+
- "8"

example/hello.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var random = require('../')('dbname')
22
var cool = random('cool.txt')
3-
cool.write(100, new Buffer('GREETINGS'), function (err) {
3+
cool.write(100, Buffer.from('GREETINGS'), function (err) {
44
if (err) return console.error(err)
55
cool.read(104, 3, function (err, buf) {
66
if (err) return console.error(err)

lib/blocks.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module.exports = function (size, start, end) {
22
var result = []
3-
for (var n = Math.floor(start/size)*size; n < end; n += size) {
3+
for (var n = Math.floor(start / size) * size; n < end; n += size) {
44
result.push({
5-
block: Math.floor(n/size),
6-
start: Math.max(n,start) % size,
7-
end: Math.min(n+size,end) % size || size
5+
block: Math.floor(n / size),
6+
start: Math.max(n, start) % size,
7+
end: Math.min(n + size, end) % size || size
88
})
99
}
1010
return result

0 commit comments

Comments
 (0)