In Javascript, when is this error thrown?
index.js
/**
* Created by tushar.mathur on 24/12/15.
*/
'use strict'
const _ = require('lodash')
const Rx = require('rx')
const createDataStore = require('./src/createDataStore')
const fetch = x => Rx.Observable.fromPromise(window.fetch(x))
const parseJSON = x => Rx.Observable.fromPromise(x.json()) // Line: 11 (Where the exception is thrown)
var create = _.partial(createDataStore, fetch, parseJSON)
module.exports = {
create,
// Alias for legacy purposes
createDataStore: create,
createFetchStore: create
}
Is it a native promise error? What does it imply? Google shows no result found.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…