Sha256: 16eee98ca6531df335a703ea478ceffb182cc615250e1ea3dd5c91c8ec70de3b

Contents?: true

Size: 1.07 KB

Versions: 123

Compression:

Stored size: 1.07 KB

Contents

var test = require('tape')
var ista = require('./')

test('strict', function(t) {
  t.ok(ista.strict(new Int8Array), 'Int8Array')
  t.ok(ista.strict(new Int16Array), 'Int16Array')
  t.ok(ista.strict(new Int32Array), 'Int32Array')
  t.ok(ista.strict(new Uint8Array), 'Uint8Array')
  t.ok(ista.strict(new Uint16Array), 'Uint16Array')
  t.ok(ista.strict(new Uint32Array), 'Uint32Array')
  t.ok(ista.strict(new Float32Array), 'Float32Array')
  t.ok(ista.strict(new Float64Array), 'Float64Array')

  t.ok(!ista.strict(new Array), 'Array')
  t.ok(!ista.strict([]), '[]')

  t.end()
})

test('loose', function(t) {
  t.ok(ista.loose(new Int8Array), 'Int8Array')
  t.ok(ista.loose(new Int16Array), 'Int16Array')
  t.ok(ista.loose(new Int32Array), 'Int32Array')
  t.ok(ista.loose(new Uint8Array), 'Uint8Array')
  t.ok(ista.loose(new Uint16Array), 'Uint16Array')
  t.ok(ista.loose(new Uint32Array), 'Uint32Array')
  t.ok(ista.loose(new Float32Array), 'Float32Array')
  t.ok(ista.loose(new Float64Array), 'Float64Array')

  t.ok(!ista.loose(new Array), 'Array')
  t.ok(!ista.loose([]), '[]')

  t.end()
})

Version data entries

123 entries across 117 versions & 23 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.59 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.58 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.57 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.56 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.55 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.54 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.53 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.52 node_modules/is-typedarray/test.js
trusty-cms-6.3.1 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.51 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.50 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.49 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.48 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.47 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.46 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.45 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.44 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.43 node_modules/is-typedarray/test.js
immosquare-cleaner-0.1.42 node_modules/is-typedarray/test.js