ezs-basics
Basics statements form EZS
Last updated a year ago by touv .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ezs-basics 
SYNC missed versions from official npm registry.

A collection of ezs basics functions.

This package cannot be used alone. ezs has to be installed

Usage

import ezs from 'ezs';
import ezsBasics from 'ezs-basics';

ezs.use(ezsBasics);

process.stdin
    .pipe(ezs('STATEMENT_NAME', { STATEMENT_PARAMETERS })
    .pipe(process.stdout);

Statements

Table of Contents

BUFObject

Take Mixed and produce Buffer. For example, it's useful to send string to browser.

Parameters

Returns Buffer

CSVObject

Take Array and transform rows into object. Each row (Array) is tranformed into a object where keys are the value of the first row

Parameters

Returns Object

CSVParse

Take String and parse CSV to generate object

Parameters

  • separator String to indicate the CSV separator (optional, default auto)
  • quote String to indicate the CSV quote. (optional, default auto)

Returns Object

CSVString

Take Object and transform row into string where each field is separated with a character

Parameters

  • format String if set to "strict" the fields will wrapped with double quote (optional, default standard)
  • separator String to indicate the CSV separator (optional, default ;)
  • header Boolean first line contains key name (optional, default true)

Returns String

JSONParse

Take String and parse JSON and generate objects

Parameters

  • separator String to split at every JSONPath found (optional, default *)

Returns Object

JSONString

Take Object and generate JSON

Parameters

  • wrap String every document are wrapped into an array (optional, default true)
  • indent String indent JSON (optional, default false)

Returns String

OBJCount

Take Object and count how many objects are received and sent the total

Parameters

Returns Number

OBJFlatten

Take Object and flat it with delimited character.

Parameters

  • separator String choose a character for flatten keys (optional, default /)
  • safe Boolean preserve arrays and their contents, (optional, default false)

Returns Object

OBJStandardize

Take Object and standardize it so each object will have the sames keys

Parameters

Returns Object

SKOSObject

Take Object generated by XMLMapping & SKOS data and create a new basic object with only keys & values

Parameters

Returns Object

TXTConcat

Take String and concat all items in just one string

Parameters

Returns String

TXTObject

Take String and generate an object with a key and a value, where the value is the input string.

Parameters

  • key String choose a the key name (optional, default value)

Returns Object

TXTParse

Take String and split at each separator found

Parameters

  • separtor String choose character which trigger the split (optional, default \n)

Returns String

TXTZip

Take a String and zip it

Returns Buffer

URLFetch

Take Object and create a new field with the content of URL. Or if no target will be specified, the output will be the content of URL

Parameters

  • url String? URL to fecth
  • target String? choose the key to set
  • json String Pasre as JSON the content of URL (optional, default false)

Returns Object

URLParse

Take String of URL, parse it and returns Object

Returns Object

URLStream

Take Object as parameters of URL, throw each chunk from the result

Parameters

  • url String? URL to fecth
  • target String? choose the key to set
  • json String Pasre as JSON the content of URL (optional, default false)

Returns Object

URLString

Take Object representing a URL and stringify it

Returns String

XMLParse

Take String as XML input, parse it and split it in multi document at each path found

Parameters

  • url String? URL to fecth
  • target String? choose the key to set
  • separator String choose a character for flatten keys (optional, default /)

Returns Object

XMLString

Take Object and transform it into a XML string

Parameters

  • rootElement String Root element name for the tag which start and close the feed (optional, default items)
  • contentElement String Content element name for the tag which start and close each item (optional, default item)

Returns String

Current Tags

  • 3.11.1                                ...           latest (a year ago)

46 Versions

  • 3.11.1                                ...           a year ago
  • 3.11.0                                ...           a year ago
  • 3.10.0                                ...           a year ago
  • 3.9.0                                ...           a year ago
  • 3.8.1                                ...           a year ago
  • 3.7.0                                ...           2 years ago
  • 3.6.7                                ...           2 years ago
  • 3.6.6                                ...           2 years ago
  • 3.6.5                                ...           2 years ago
  • 3.6.4                                ...           2 years ago
  • 3.6.2                                ...           2 years ago
  • 3.6.0                                ...           3 years ago
  • 3.5.4                                ...           3 years ago
  • 3.5.3                                ...           3 years ago
  • 3.5.2                                ...           3 years ago
  • 3.5.1                                ...           3 years ago
  • 3.5.0                                ...           3 years ago
  • 3.4.0                                ...           3 years ago
  • 3.3.6                                ...           3 years ago
  • 3.3.5                                ...           3 years ago
  • 3.3.4                                ...           3 years ago
  • 3.3.3                                ...           3 years ago
  • 3.3.2                                ...           3 years ago
  • 3.3.1                                ...           3 years ago
  • 3.3.0                                ...           3 years ago
  • 3.2.2                                ...           3 years ago
  • 3.2.1                                ...           3 years ago
  • 3.2.0                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 3.0.3                                ...           3 years ago
  • 3.0.2                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.3.0                                ...           3 years ago
  • 2.2.5                                ...           4 years ago
  • 2.2.4                                ...           4 years ago
  • 2.2.3                                ...           4 years ago
  • 2.2.2                                ...           4 years ago
  • 2.2.1                                ...           4 years ago
  • 2.2.0                                ...           4 years ago
  • 2.1.1                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (9)
Dev Dependencies (15)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |