Skip to content

Commit

Permalink
feature(deepword) rm _zip
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Oct 18, 2018
1 parent c43a105 commit eb1fe8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 0 additions & 6 deletions client/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {inherits} from 'util';

import {promisify} from 'es6-promisify';
import {patch, read, write, prefix} from 'restafary/legacy/client';
import zipio from 'zipio';
import {json as loadJson} from 'load.js';
import Emitify from 'emitify/legacy'
import {createPatch} from 'daffy';
Expand All @@ -31,7 +30,6 @@ import story from './story';

const loadJson_ = promisify(loadJson);
const read_ = promisify(read);
const zipio_ = promisify(zipio);

const _alert = currify(alert);

Expand Down Expand Up @@ -153,10 +151,6 @@ Deepword.prototype._writeHTTP = function(path, data) {
write(path, data, onSave);
};

Deepword.prototype._zip = function(value) {
return zipio_(value);
}

Deepword.prototype._loadOptions = async function() {
const {_prefix, _options} = this;

Expand Down
6 changes: 4 additions & 2 deletions client/api/save.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use strict';

const wraptile = require('wraptile/legacy');
const {promisify} = require('es6-promisify');
const zipio = promisify(require('zipio'));

const setValue = wraptile(_setValue);

export default function() {
module.exports = function() {
save.call(this)
.then(setValue(this));

Expand All @@ -29,7 +31,7 @@ async function save() {
if (!zip)
return this._write(_filename, value);

const zipedValue = await this._zip(value);
const zipedValue = await zipio(value);
return this._write(`${_filename}?unzip`, zipedValue);
}

Expand Down

0 comments on commit eb1fe8a

Please sign in to comment.