Skip to content

tellnes/sort-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sort Parser

sort-parser

Example

var SortParser = require('sort-parser')

var sp = new SortParser(
      { format: SortParser.es
      , fields: ['name', 'email']
      , strict: true
      }
    )

assert.deepEquals(
    sp.parse('-email,name')
  , [ { 'email': 'desc' }, { 'name': 'asc' } ]
  )

Install

$ npm install sort-parser

Test

$ npm test

License

MIT

About

Sort Parser for Node

Resources

License

Stars

Watchers

Forks

Packages

No packages published