Is there way to make eraser?

Hi, i have layout with background image, and brush as sprite image. And i need eraser, but i dont have idea how make it. thx

UPD:

Here is simple example (coffeescript), I dont know whether this is the best solution. i expected something like: globalCompositeOperation=“destination-out” in native canvas, or blendFunction like in this answer How can I implement an eraser?, but i dont know how use it in cocos2d js, cant found in documetation.

BackgroundLayer = cc.Layer.extend(

  ctor: ->
    @_super()
    @init()

  init: ->
    @_super()
    windowSize = cc.director.getWinSize()
    centerPoint = cc.p(windowSize.width / 2, windowSize.height / 2)

    spriteBG = cc.Sprite.create(res.tableBg)
    spriteBG.setPosition(centerPoint)
    @addChild(spriteBG)

    cc.eventManager.addListener
      event: cc.EventListener.TOUCH_ONE_BY_ONE

      onTouchMoved: (e) =>
        pos = e.getLocation()
        @drawImage(pos)
    , @

  drawImage: (pos) ->
    part = cc.Sprite.create res.part
    part.setPosition(pos)
    part.setScale(1.5)
    @addChild(part)
)

your question is too short. what are you doing?
because the answer will depend.
is it a paint program? may be you need layers (separate layered bitmaps) or command pattern, etc…
or maybe you just need a way to manipulate the original sprite content?

You may try RenderTexture, set the size and position of this RenderTexture the same as the sprite you want to manipulate, and put it overlap this sprite. Then draw something to mask it to fake a erase effect.