Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
/ sds Public
forked from 418sec/sds

structured data search

Notifications You must be signed in to change notification settings

Mik317/sds

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icon

usage

list

list

search

search

suche die struktur

sds = require 'sds'

# test against sds.extnames [list of supported file extensions]

if path.extname(infile) in sds.extnames

    # load object from file
    
    obj = sds.load infile

    # find something ...
    
    sds.find.value     obj, '*value' 
    sds.find.key       obj, '*key' 
    sds.find.path      obj, '*path' 
    sds.find.keyValue  obj, '*key',  '*value'
    sds.find.pathValue obj, '*path', '*value'
    
    # all find methods return a list of keypaths
    # each keypath is in itself a list of strings
    #
    # use sds.get to retrieve the value at a keypath
    
    sds.get obj, keypath

    # use stringify to convert to any of the supported formats
    
    sds.stringify obj, ext: 'yaml'
    
    # or save to disk (format is deduced from extension)
    
    sds.save outfile, obj
    
    # happy searching :-)

npm package Build Status downloads Dependencies Status

About

structured data search

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 97.5%
  • JavaScript 2.5%