New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-data-binder

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-data-binder

データをタコ足配線的にまとめる

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
3
-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

node-data-binder

データをタコ足配線的にまとめる

Install

$ npm install node-data-binder

Description

サポートされたフォーマットのデータを JS に変換してオブジェクトにまとめます。
(.json .json5 .js .txt .xml .csv)

data/
    ├── status.json
    ├── package.json5
    ├── books.xml
    ├── number.csv
    ├── readme.txt
.
.
.
↓

data: {
  status : {
    [status.json]
  },
  books: {
    [books.xml -> Js]
  },
  number: {
    [number.csv -> Js]
  },
  readme: {
    [readme.txt -> Js]
  }
}

Usage

const binder = require('node-data-binder');

let data = binder({
  dir: './data',      // データがあるディレクトリまでのパス
  keyWithExt: false   // キー名に拡張子を含めるかどうか
});

console.log('[data]', data);

Todo

  • word excel サポートする?
  • cson eson サポートする?

License

MIT

FAQs

Package last updated on 11 Dec 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