array-starts-with
v1.1.15
Published
The same as String.prototype.startsWith but comparing array elements instead of string characters
Downloads
76
Maintainers
Readme
array-starts-with
The same as String.prototype.startsWith but comparing array elements instead of string characters
installation
with npm:
npm i --save array-starts-with
or with yarn:
yarn add array-starts-with
usage
import arrayStartsWith from 'array-starts-with'
// or:
// const arrayStartsWith = require('array-starts-with').default;
const base = ['foo', 'bar', 'baz'];
const start = ['foo', 'bar'];
const result = arrayStartsWith(base, start);
expect(result).to.equal(true);