API Docs for: 0.0.1
Show:

JSON Class

Module: lib/json.js
Parent Module: js-ext

Pollyfils for often used functionality for Arrays Copyright (c) 2014 ITSA - https://github.com/itsa New BSD License - http://choosealicense.com/licenses/bsd-3-clause/

Item Index

Methods

Methods

isObject

(
  • item
  • clone
)
Object | Array static

Transforms String-properties into true Date-objects in case they match the Date-syntax. To be used whenever you have parsed a JSON.stringified object without a Date-reviver.

Parameters:

  • item Object | Array

    the JSON-parsed object which the date-string fields should be transformed into Dates.

  • clone Boolean=false

    whether to clone item and leave it unspoiled. Cloning means a performancehit, better leave it false, which will lead into changing item which in fact will equal the returnvalue.

Returns:

Object | Array:

the transormed item

parseWithDate

(
  • stringifiedObj
)
Number | Undefined

Parses a stringified object and creates true Date properties.

Parameters:

  • stringifiedObj Number

    lower-edgde

Returns:

Number | Undefined:

the value, forced to be inbetween the edges. Returns undefined if max is lower than min.