Skip to content

forbesmyester/t-fp-to-pairs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

t-fp-to-pairs

Usage

Simple toPairs() function wrote in Typescript.

import toPairs from 't-fp-to-pairs';

let a: {[k: string]: boolean|string} = {a: false, b: 'bob'};
let result = toPairs(a); // [['a', false], ['b', 'bob']]

The type for result is [string, string | boolean][].

Installation

Use npm install t-fp-to-pairs to install.

About

toPairs<T>(ob: {[k: string]: T}): [string, T][]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published