test('test JSONLDNode construction via factory method', t => {
  const node = JSONLDNode()
  t.plan(9)
  t.ok(node instanceof JSONLDNode,
    'is a JSONLDNode')
  t.ok(node instanceof Map,
    'is an Map')
  t.ok(node instanceof Collection.Keyed,
    'is an Collection.Keyed')
  t.ok(node instanceof Collection,
    'is an Collection')
  t.ok(node instanceof Iterable,
    'is an Iterable')
  t.ok(JSONLDNode.isJSONLDNode(node), 'isJSONLDNode()')
  t.ok(Map.isMap(node), 'isMap()')
  t.ok(Iterable.isIterable(node), 'isIterable()')
  t.ok(Iterable.isKeyed(node), 'isKeyed()')
})
test('test JSONLDValue construction via factory method', t => {
  const value = JSONLDValue()
  t.plan(9)
  t.ok(value instanceof JSONLDValue,
    'is a JSONLDValue')
  t.ok(value instanceof Immutable.Map,
    'is an Immutable.Map')
  t.ok(value instanceof Immutable.Collection.Keyed,
    'is an Immutable.Collection.Keyed')
  t.ok(value instanceof Immutable.Collection,
    'is an Immutable.Collection')
  t.ok(value instanceof Immutable.Iterable,
    'is an Immutable.Iterable')
  t.ok(JSONLDValue.isJSONLDValue(value), 'isJSONLDValue()')
  t.ok(Immutable.Map.isMap(value), 'isMap()')
  t.ok(Immutable.Iterable.isIterable(value), 'isIterable()')
  t.ok(Immutable.Iterable.isKeyed(value), 'isKeyed()')
})
 it('it should return a keyed Map for the state dictionaries', () => {
     Iterable.isKeyed(this.actual.get('items')).should.be.true;
 });
Example #4
0
export default function isKeyed(data) {
  return isImmutable(data)
    ? Iterable.isKeyed(data)
    : isObject(data)
}
Example #5
0
var isMap = function(obj){ return Immutable.Iterable.isKeyed(obj); };
export function isImmutableJsMap(obj) { return Immutable.Iterable.isKeyed(obj); };