blockdevice
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -284,3 +284,3 @@ var os = require( 'os' ) | ||
read: function( position, length, buffer, callback ) { | ||
_read: function( position, length, buffer, callback ) { | ||
@@ -335,3 +335,3 @@ if( this.fd == null ) | ||
this.read( from, to - from, buffer, callback ) | ||
this._read( from, to - from, buffer, callback ) | ||
@@ -342,3 +342,3 @@ return this | ||
write: function( offset, buffer, callback ) { | ||
_write: function( offset, buffer, callback ) { | ||
@@ -369,3 +369,3 @@ if( this.fd == null ) | ||
this.write( offset, buffer, callback ) | ||
this._write( offset, buffer, callback ) | ||
@@ -372,0 +372,0 @@ return this |
@@ -44,2 +44,7 @@ /** | ||
if( typeof buffer === 'function' ) { | ||
callback = buffer | ||
buffer = null | ||
} | ||
callback = callback.bind( this ) | ||
@@ -63,3 +68,3 @@ | ||
writeBlocks: function( from, data, callback ) { | ||
writeBlocks: function( from, buffer, callback ) { | ||
@@ -77,3 +82,3 @@ callback = callback.bind( this ) | ||
this.device.writeBlocks( from, data, callback ) | ||
this.device.writeBlocks( from, buffer, callback ) | ||
@@ -80,0 +85,0 @@ return this |
# The MIT License (MIT) | ||
Copyright (c) 2014 Jonas Hermsmeier | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE | ||
OR OTHER DEALINGS IN THE SOFTWARE. |
{ | ||
"name": "blockdevice", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Block Device", | ||
"main": "lib/blockdevice", | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"devDependencies": { | ||
"mocha": "~2.3.3" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "mocha" | ||
}, | ||
@@ -11,0 +13,0 @@ "keywords": [ |
@@ -1,9 +0,8 @@ | ||
# BlockDevice | ||
# Block Device | ||
[![npm](https://img.shields.io/npm/v/blockdevice.svg?style=flat-square)](https://npmjs.com/blockdevice) | ||
[![npm downloads](https://img.shields.io/npm/dm/blockdevice.svg?style=flat-square)](https://npmjs.com/blockdevice) | ||
[![build status](https://img.shields.io/travis/jhermsmeier/node-blockdevice.svg?style=flat-square)](https://travis-ci.org/jhermsmeier/node-blockdevice) | ||
[![npm](http://img.shields.io/npm/v/blockdevice.svg?style=flat)](https://npmjs.org/blockdevice) | ||
[![npm downloads](http://img.shields.io/npm/dm/blockdevice.svg?style=flat)](https://npmjs.org/blockdevice) | ||
[![build status](http://img.shields.io/travis/jhermsmeier/node-blockdevice.svg?style=flat)](https://travis-ci.org/jhermsmeier/node-blockdevice) | ||
## Install via [npm](https://npmjs.com) | ||
## Install via [npm](https://npmjs.org) | ||
```sh | ||
@@ -59,3 +58,3 @@ $ npm install blockdevice | ||
### device.read( offset, length, buffer, callback ) | ||
### device._read( offset, length, buffer, callback ) | ||
- offset: Number | ||
@@ -74,3 +73,3 @@ - length: Number | ||
### device.write( offset, buffer, callback ) | ||
### device._write( offset, buffer, callback ) | ||
- offset: Number | ||
@@ -77,0 +76,0 @@ - buffer: Buffer |
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
20070
466
1
1
8
108
2