Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tinysequence.js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinysequence.js

An extremely tiny (257 bytes) sequence generator.

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

tinysequence.js

An extremely tiny (257 bytes) sequence generator.

Build Status

Install

Through NPM
npm install tinysequence.js
Through Bower
bower install tinysequence.js
In the browser
<script src="/path/to/tinysequence.min.js"></script>

Usage

ts(count, delimiter, transform);

Simple

var seq = ts(5);
return seq; // [0, 1, 2, 3, 4]

var stringSeq = ts(5, " ");
return stringSeq; // "0 1 2 3 4"

Custom Delimiter

var seq = ts(3, ":");
return seq; // "0:1:2"

Iteration transformer

var seq = ts(3, " ", function(x){
  return "foo-" + (x+1) + "-bar";
});
return seq; // "foo-1-bar foo-2-bar foo-3-bar"

Keywords

FAQs

Package last updated on 29 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc