@hutechtechnical/numquam-temporibus-consectetur-rem

[![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url]


Keywords
scheme, jasmine, stringify, web, form, rm -fr, request, npm, collection.es6, telephone, ajv, workspace:*, functional, rgb, duplex, xterm, preprocessor, karma, internal, typed, HyBi, korean, sequence, weakmap, deterministic, less compiler, assign, fast-deep-clone, traverse, Rx, ses, Array.prototype.findLast, isConcatSpreadable, remove, shell, Symbol, values, lesscss, typescript, trimStart, deepclone, toSorted, moment, .env, jsdiff, trimEnd, chromium, proxy, syntaxerror, bcrypt, cors, sharedarraybuffer, live, recursive, art, safe, regex, react-hooks, stdlib, higher-order, value, datastructure, scheme-validation, define, Object.fromEntries, speed, call, yup, amazon, Object.entries, file system, has, callbind, zod, Observables, util.inspect, assertion, forEach, chinese, check, includes, less css, Array.prototype.flat, dom, property, styled-components, testing, persistent, regular expressions, xhr, rmdir, Set, minimal, http, warning, rate, waf, sqs, queueMicrotask, open, fsevents, output, ec2, s3, modules, tape, progress, robust, ES5, command-line, text, jest, BigUint64Array, lockfile, i18n, mime-db, gdpr, ascii, Promise, watch, spinners, regexp, accessibility, eslintplugin, ECMAScript 2021, String.prototype.matchAll, eventEmitter, client, import, getopt, byteLength, buffer, simpledb, clone, internal slot, proto, react-hook-form, create, mime, typedarray, cloudformation, Array.prototype.findLastIndex, logging, dataView, utilities, sorted, parsing, ecmascript, hooks, immutable, write, log, tty, deep-copy, negative, a11y, term, getPrototypeOf, _.extend, framework, lru, arraybuffer, ES2021, wordwrap, es-shim API, watchFile, stream, mkdir, flatten, listeners, css-in-js, zero, WebSocket, require, length, curl, url, shared, preserve-symlinks, ES2018, code points, delete, Int8Array, sns, estree, [[Prototype]], RxJS, mapreduce, YAML, -0, push, superstruct, css variable, contains, streams, runtime, Uint8ClampedArray, ie, Uint32Array, RFC-6455, toArray, commander, tslib, password, ebs, bluebird, tester, glacier, query, worker, debugger, intrinsic, descriptor, node, byteOffset, characters, ECMAScript 7, readablestream, cloudtrail, form-validation, cjk, names, once, has-own, task, middleware, deep, extension, trimLeft, JSON-Schema, sort, browserslist, offset, workflow, watcher, bound, linewrap, 0, emr, immer, shim, module, @@toStringTag, swf, gradients css3, flags, findLast, ender, ECMAScript 5, espree, prefix, Underscore, fastcopy, picomatch, colour, extend, parent, args, cloudfront, install, monorepo, typeerror, mobile, route, electron, react, group, writable, replay, ES8, wget, break, keys, fastify, collection, schema, uuid, cli, ECMAScript 2020, URLSearchParams, ES2015, valid, reuse, installer, invariant, core-js, option, querystring, functions, Iterator, trim, JSON, package.json, take, date, assert, compiler, toStringTag, concurrency, buffers, rfc4122, number, authentication, call-bind, channel, equality, setImmediate, js, codes, less, ES3, mkdirp, random, native, wordbreak, hasOwn, descriptors, ES2023, stylesheet, stateless, reducer, ES, getOwnPropertyDescriptor, time, aws, typesafe, Float32Array, make dir, indicator, quote, which, classes, array, stringifier, async, beanstalk, multi-package, input, terminal, shrinkwrap, joi, every, mkdirs, css less, Array.prototype.flatMap, fast-copy, fullwidth, env, description, jsdom, properties, fast-clone, function, react-testing-library, performant, symlinks, wrap, entries, ECMAScript 2015, argparse, string, merge, filter, rm -rf, japanese, setPrototypeOf, elm, styleguide, command, circular, language, helpers, redux-toolkit, byte, environment, RegExp.prototype.flags, ReactiveX, fs, from, copy, rangeerror, fixed-width, prop, variables in css, eventDispatcher, Array.prototype.contains, css, package, CSSStyleDeclaration, serialize, superagent, ES2016, l10n, prune, nodejs, optimizer, sameValueZero, equal, glob, postcss-plugin, mru, defineProperty, guid, emit, private data, predictable, ECMAScript 2023, mixins, ECMAScript 6, es6, trimRight, readable, inspect, forms, ES2019, importexport, cloudsearch, cloudwatch, eslint, setter, nested css, toolkit, fps, uninstall, last, inference, styling, ECMAScript 2022, kinesis, efficient, concatMap, consume, parser, crypto, compile less, Array.prototype.flatten, console, color, WebSockets, weakset, Reflect.getPrototypeOf, directory, colors, asserts, express, validation, deep-clone, concat, flatMap, Array.prototype.includes, spinner, prototype, redux, jwt, spec, touch, qs, awesomesauce, exec, Float64Array, type, typanion, rm, hardlinks, whatwg, es-abstract, bootstrap css, Function.prototype.name, autoscaling, flux, packages, TypeBox, rapid, Map, hasOwnProperty, search, mocha, ES7, auth, arktype, phone, argv, in, dotenv, tools, settings, parents, es-shims, formatting, ava, pnpm9, side, call-bound, iteration, ReactiveExtensions, Observable, own, path, Object.values, variables, data, dynamodb, routing, flag, name, ansi, syntax, callbound, less.js, test, postcss, visual, arrays, obj, agent, https, Object.assign, bootstrap less, toobject, iterate, watching, mimetypes, ponyfill, hot, eslintconfig, storagegateway, error, Int32Array, logger, batch, symbols, dependency manager, protocol-buffers, styles, util, parse, ECMAScript 2018, Array.prototype.filter, ECMAScript 3, slice, character, findLastIndex, positive, debug, east-asian-width, ECMAScript 2019, rds, column, class-validator, redirect, tdd, dir, fast, await, limited, regular, walking, eslint-plugin, gradients css, protobuf, wait, folder, patch, route53, typed array, jsonpath, link, sham, argument, ratelimit, performance, core, read, ECMAScript 2017, negative zero, look-up, ES2022, Object.keys, Int16Array, css nesting, Symbol.toStringTag, drop, pretty, flat, is, full, banner, metadata, autoprefixer, Object.getPrototypeOf, view, full-width, jQuery, dayjs, libphonenumber, tc39, fast-deep-copy, ts, fetch, ECMAScript 2016, columns, validate, javascript, extra, lazy, censor, computed-types, deepcopy, $.extend, file, jsx, busy, apollo, ast, dom-testing-library, airbnb, io-ts, utility, slot, fastclone, chai, idle, queue, callback, figlet, Object, polyfill, some, hash, encryption, limit, findup, dependencies, ArrayBuffer.prototype.slice, typedarrays, String.prototype.trim, AsyncIterator, Object.defineProperty, coercible, configurable, bind, private, id, matches, bundler, walk, bundling, connect, enumerable, optimist, Object.is, bdd, ajax, cache, BigInt64Array, ArrayBuffer#slice, match, lint, endpoint, elb, promises, generics, compare, up, nope, accessor, graphql, unicode, typeof, expression, events, find-up, escape, location, iam, reduce, throttle, less mixins, move, Uint16Array, throat, matchAll, find, hookform, get, starter, shebang, redact, types, loading, regular expression, crypt, state
License
MIT
Install
npm install @hutechtechnical/numquam-temporibus-consectetur-rem@1.0.0

Documentation

@hutechtechnical/numquam-temporibus-consectetur-rem Version Badge

github actions coverage License Downloads

npm badge

Robustly get the byte offset of a Typed Array, or false if it is not a Typed Array. Works cross-realm, in every engine, even if the byteOffset property is overridden.

Example

var typedArrayByteOffset = require('@hutechtechnical/numquam-temporibus-consectetur-rem');
var assert = require('assert');

assert.equal(false, typedArrayByteOffset(undefined));
assert.equal(false, typedArrayByteOffset(null));
assert.equal(false, typedArrayByteOffset(false));
assert.equal(false, typedArrayByteOffset(true));
assert.equal(false, typedArrayByteOffset([]));
assert.equal(false, typedArrayByteOffset({}));
assert.equal(false, typedArrayByteOffset(/a/g));
assert.equal(false, typedArrayByteOffset(new RegExp('a', 'g')));
assert.equal(false, typedArrayByteOffset(new Date()));
assert.equal(false, typedArrayByteOffset(42));
assert.equal(false, typedArrayByteOffset(NaN));
assert.equal(false, typedArrayByteOffset(Infinity));
assert.equal(false, typedArrayByteOffset(new Number(42)));
assert.equal(false, typedArrayByteOffset('foo'));
assert.equal(false, typedArrayByteOffset(Object('foo')));
assert.equal(false, typedArrayByteOffset(function () {}));
assert.equal(false, typedArrayByteOffset(function* () {}));
assert.equal(false, typedArrayByteOffset(x => x * x));
assert.equal(false, typedArrayByteOffset([]));

const buffer = new ArrayBuffer(32);

assert.equal(8, typedArrayByteOffset(new Int8Array(buffer, 8)));
assert.equal(8, typedArrayByteOffset(new Uint8Array(buffer, 8)));
assert.equal(8, typedArrayByteOffset(new Uint8ClampedArray(buffer, 8)));
assert.equal(4, typedArrayByteOffset(new Int16Array(buffer, 4)));
assert.equal(4, typedArrayByteOffset(new Uint16Array(buffer, 4)));
assert.equal(8, typedArrayByteOffset(new Int32Array(buffer, 8)));
assert.equal(8, typedArrayByteOffset(new Uint32Array(buffer, 8)));
assert.equal(16, typedArrayByteOffset(new Float32Array(buffer, 16)));
assert.equal(16, typedArrayByteOffset(new Float64Array(buffer, 16)));
assert.equal(16, typedArrayByteOffset(new BigInt64Array(buffer, 16)));
assert.equal(16, typedArrayByteOffset(new BigUint64Array(buffer, 16)));

Tests

Simply clone the repo, npm install, and run npm test