JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15536493
  • Score
    100M100P100Q276443F
  • License MIT

Parse postgres array columns

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postgres-array) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    postgres-array tests

    Parse postgres array columns

    Install

    npm install --save postgres-array

    Usage

    const { parse } = require('postgres-array')
    
    parse('{1,2,3}', (value) => parseInt(value, 10))
    //=> [1, 2, 3]

    API

    parse(input, [transform]) -> array

    input

    Required
    Type: string

    A Postgres array string.

    transform

    Type: function
    Default: identity

    A function that transforms non-null values inserted into the array.

    License

    MIT © Ben Drucker