 createError           = Errors.createError
 AlreadyEndError       = createError("AlreadyEnd", 0x53)
 AlreadyRunError       = createError("AlreadyRun", 0x54)
+isBuffer              = Buffer.isBuffer
 
 Errors.AlreadyEndError  = AlreadyEndError
 Errors.AlreadyRunError  = AlreadyRunError

# Copyright (c) 2013 Rod Vagg, MIT License
# Copyright (c) 2014 Riceball LEE, MIT License
util                  = require("abstract-object/lib/util")
inherits              = util.inherits
isArray               = util.isArray
Errors                = require('abstract-object/Error')
AbstractError         = Errors.AbstractError
NotImplementedError   = Errors.NotImplementedError

  @AlreadyEndError: AlreadyEndError
  @AlreadyRunError: AlreadyRunError

  constructor: (@db, options) ->
    @_ended = false
    @_nexting = false
    @options = @initOptions(options)

    isKeysIterator = options and isArray options.range
    if isKeysIterator
