Skip to content
/ dmda Public

Deconstruct Multi Dimension Array!(Multi to One OR Multi to Multi)

Notifications You must be signed in to change notification settings

yumcc-com/dmda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Deconstruct Multi Dimension Array

Deconstruct Multi Dimension Array!(Multi to One OR Multi to Multi)

Installation

npm i --save dmda

Usage

const dmda = require('dmda')

Example

const query = dmda([1, 2, [3, 'yumcc', ['dadm', 999, ['5', 4]]], 4])

returns

[ 1, 2, 3, 'yumcc', 'dadm', 999, '5', 4, 4 ]

Options

const query = dmda([
  1,
  2,
  3,
  4,
  4,
  2,
  4,
  5,
  7
], {
  isRepeat: true // default: false
})

returns

[ 1, 2, 3, 4, 5, 7 ]
const query = dmda([
  1,
  [2, 3],
  [4, 5, [6, 7]]
], {
  level: 1 // default: Infinity
})

returns

[ 1, 2, 3, 4, 5, [ 6, 7 ] ]

About

Deconstruct Multi Dimension Array!(Multi to One OR Multi to Multi)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published