JSPM

@jswork/next-sample

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 266
  • Score
    100M100P100Q100967F
  • License MIT

Get an/some element from array like target.

Package Exports

  • @jswork/next-sample
  • @jswork/next-sample/dist/index.esm.js
  • @jswork/next-sample/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jswork/next-sample) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

next-sample

Get an/some element from array like target.

version license size download

installation

npm install -S @jswork/next-sample

usage

import '@jswork/next-sample';

const arr = [1,2,3,4,5,6,7];

nx.sample(arr); // 2
nx.sample(arr); // 5

nx.sample(arr, 1); // [5]
nx.sample(arr, 2); // [1, 2]
nx.sample(arr, 2); // [3, 6]
nx.sample(arr, 2); // [5, 6]

license

Code released under the MIT license.