Tabnine Logo For Javascript
Array.values
Code IndexAdd Tabnine to your IDE (free)

How to use
values
function
in
Array

Best JavaScript code snippets using builtins.Array.values(Showing top 15 results out of 315)

origin: o2team/athena

// 用来给字体指定唯一标识
// 字体的 ID 根据 font-family 以及其他 font-* 属性来生成
// @see https://github.com/aui/font-spider/issues/32
function getFontId (name, options) {

  var values = getFontId.keys.map(function (key, index) {

    var value = options[key] || getFontId.values[index];

    if (typeof value !== 'string') {
      value = getFontId.values[index];
    } else if (getFontId.alias[key]) {
      value = value.replace.apply(value, getFontId.alias[key]);
    }

    return value;
  });

  values.unshift(name);

  var id = values.join('-');
  id = crypto.createHash('md5').update(id).digest('hex');

  return id;
}
origin: Financial-Times/polyfill-library

it('returns a next-able object', function () {
  var array = ['val1', 'val2'];
  var iterator = array.values();

  proclaim.isInstanceOf(iterator.next, Function);
  proclaim.deepEqual(iterator.next(), {
    value: 'val1',
    done: false
  });
});
origin: koalanlp/nodejs-support

/**
   * @see Array#values
   * @returns {Iterator.<T>}
   */
  values(){
    return this._items.values();
  }
origin: koalanlp/nodejs-support

describe('DependencyTag', () => {
      it('discriminate tags', () => {
        let values = DependencyTag.values();
        let codes = values.map((c) => c.tagname);

        _.range(100).forEach(() => {
          let filtered = codes.filter(() => _.random(0, 1) == 1);
          for (const tag of values) {
            expect(Util.contains(filtered, tag)).toBe(filtered.includes(tag.tagname));
          }
        });

        for (const code of codes) {
          expect(DependencyTag.withName(code)).toBe(DependencyTag[code]);
        }
      });
    });
origin: Financial-Times/polyfill-library

/* globals proclaim, Symbol */

it('is an alias to Array.prototype.values', function () {
  proclaim.deepEqual(Array.prototype[Symbol.iterator], Array.prototype.values);
});
origin: visgl/loaders.gl

/**
  * @param {Uint8Array[]} chunks
  */
 constructor(chunks) {
  // @ts-ignore
  super(new BlobStreamController(chunks.values()), {type: 'bytes'});
  /** @private */
  this._chunks = chunks;
 }
origin: koalanlp/nodejs-support

expect(
    POS.values().every((tag) => jsmorph.hasTag(tag.tagname) === jsmorph.reference.hasTag(tag.tagname))
  ).toBe(true);
origin: Financial-Times/polyfill-library

it('has correct name', function () {
  try {
    proclaim.hasName(Array.prototype.values, 'values');
  } catch (e) {
    // Chrome 40 implements the Symbol.iterator function for Arrays but has it named ArrayValues.
    try {
      proclaim.equal([].values.name, 'ArrayValues');
    } catch (er) {
      // Firefox 44 has it named [Symbol.iterator].
      proclaim.equal([].values.name, '[Symbol.iterator]');
    }
  }
});
origin: adam-cowley/neode

/**
   * Iterator
   */
  [Symbol.iterator]() {
    return this._values.values();
  }
origin: Financial-Times/polyfill-library

/* globals proclaim */

it('is a function', function () {
  proclaim.isFunction(Array.prototype.values);
});
origin: electricmonk/goos-nodejs

columns() {
    return Column.values;
  }
origin: gerardobort/node-corenlp

[Symbol.iterator]() {
  return this._tokens.values();
 }
origin: Financial-Times/polyfill-library

it('has correct arity', function () {
  proclaim.arity(Array.prototype.values, 0);
});
origin: Financial-Times/polyfill-library

it('finally returns a done object', function () {
  var array = ['val1', 'val2'];
  var iterator = array.values();
  iterator.next();
  iterator.next();
  proclaim.deepEqual(iterator.next(), {
    value: undefined,
    done: true
  });
});
origin: koalanlp/nodejs-support

describe('CoarseEntityType', () => {
      it('discriminate tags', () => {
        let values = CoarseEntityType.values();
        let codes = values.map((c) => c.tagname);

        _.range(100).forEach(() => {
          let filtered = codes.filter(() => _.random(0, 1) == 1);
          for (const tag of values) {
            expect(Util.contains(filtered, tag)).toBe(filtered.includes(tag.tagname));
          }
        });

        for (const code of codes) {
          expect(CoarseEntityType.withName(code)).toBe(CoarseEntityType[code]);
        }
      });
    });
builtins(MDN)Arrayvalues

JSDoc

Returns an iterable of values in the array

Most used builtins functions

  • Console.log
  • Console.error
  • Promise.then
    Attaches callbacks for the resolution and/or rejection of the Promise.
  • Promise.catch
    Attaches a callback for only the rejection of the Promise.
  • Array.push
    Appends new elements to an array, and returns the new length of the array.
  • Array.length,
  • Array.map,
  • String.indexOf,
  • fetch,
  • Window.location,
  • Window.addEventListener,
  • ObjectConstructor.keys,
  • Array.forEach,
  • Location.reload,
  • Response.status,
  • Navigator.serviceWorker,
  • ServiceWorkerContainer.register,
  • ServiceWorkerRegistration.installing,
  • ServiceWorkerContainer.controller

Popular in JavaScript

  • lodash
    Lodash modular utilities.
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • express
    Fast, unopinionated, minimalist web framework
  • q
    A library for promises (CommonJS/Promises/A,B,D)
  • handlebars
    Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
  • node-fetch
    A light-weight module that brings window.fetch to node.js
  • axios
    Promise based HTTP client for the browser and node.js
  • cheerio
    Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • chalk
    Terminal string styling done right
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now