summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/reducers/file.js
blob: 028afc63cff8b1a30987e4186c89d9a1e4a9f760 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const { Record } = require('immutable');

const DEFAULTS = {
    type:  '',
    mtime: '',
    path:  ''
};

class FileState extends Record(DEFAULTS) {
    static create(state) {
        return state instanceof FileState ?
            state : new FileState(state);
    }
}

module.exports = FileState;