Quickly fuzzy find classes, mixins, methods, file:

- Ctrl-T Open fuzzy finder dialog

In frame mode you can toggle the list naviation frame on the left side:

- Ctrl-L Toggle list view

You can focus a list in frame mode or toggle a tab in frameless mode:

- Ctrl-C Class list
- Ctrl-I Mixin list
- Ctrl-F File list
- Ctrl-M Method list
- Ctrl-E Extras list

You can focus and blur the search input:

- Ctrl-S Focus search input
- Esc Blur search input

In frameless mode you can close the list tab:

- Esc Close list tab

# Class CSON

Defined in: | src/lib/cson.coffee

## Overview

Public: The exported CSON singleton

## Instance Method Summary

- String ::createCSONString(data, opts) Converts an Object into a CSON String
- String ::createJSONString(data, opts) Converts an Object into a JSON String
- String ::createString(data, opts) Converts an Object into a String of the desired format If the format option is not specified, we default to CSON
- Object ::load(data, opts) Parses a file path of the desired format into an Object If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON
- Object ::parse(data, opts) Converts a String of the desired format into an Object If the format option is not specified, we default to CSON
- Object ::parseCSFile(file, opts) Parses a CoffeeScript file into an Object
- Object ::parseCSONFile(file, opts) Parses a CSON file into an Object
- Object ::parseCSONString(data, opts) Parses a CSON String into an Object
- Object ::parseCSString(data, opts) Parses a CoffeeScript String into an Object
- Object ::parseFile(data, opts) Parses a file path of the desired format into an Object If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON
- Object ::parseJSFile(file, opts) Parses a JAvaScript file into an Object
- Object ::parseJSONFile(file, opts) Parses a JSON file into an Object
- Object ::parseJSONString(data, opts) Parses a JSON String into an Object
- Object ::parseJSString(data, opts) Parses a JavaScript String into an Object
- Object ::parseString(data, opts) Converts a String of the desired format into an Object If the format option is not specified, we default to CSON
- Object ::require(data, opts) Requires or parses a file path of the desired format into an Object If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON
- Object ::requireCSFile(file, opts) Requires a CoffeeScript file and returns the result Object
- Object ::requireCSONFile(file, opts) Parses a CSON file into an Object
- Object ::requireFile(data, opts) Requires or parses a file path of the desired format into an Object If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON
- Object ::requireJSFile(file, opts) Requires a JavaScript file and returns the result Object
- Object ::requireJSONFile(file, opts) Parses a JSON file into an Object
- String ::stringify(data, opts) Converts an Object into a String of the desired format If the format option is not specified, we default to CSON

## Instance Method Details

String ::createCSONString(data, opts) Source

Public: Converts an Object into a CSON String data - Object The data to convert opts - Object The options (options may also be forwarded onto the parser library) :visitor - Boolean The visitor option for `require('cson-parser').stringify` (defaults to `null`) :indent - Boolean The indent option for `require('cson-parser').stringify` (defaults to a single tab `'\t'`) Returns String or Error

### Parameters:

- (Object) data — Object The data to convert
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (Boolean) visitor — Boolean The visitor option for `require('cson-parser').stringify` (defaults to `null`)
- (Boolean) indent — Boolean The indent option for `require('cson-parser').stringify` (defaults to a single tab `'\t'`)

### Returns:

- (`String`) — Returns String or Error

String ::createJSONString(data, opts) Source

Public: Converts an Object into a JSON String data - Object The data to convert opts - Object The options (options may also be forwarded onto the parser library) :visitor - Boolean The visitor option for `JSON.stringify` (defaults to `null`) :indent - Boolean The indent option for `JSON.stringify` (defaults to two spaces ` `) Returns String or Error

### Parameters:

- (Object) data — Object The data to convert
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (Boolean) visitor — Boolean The visitor option for `JSON.stringify` (defaults to `null`)
- (Boolean) indent — Boolean The indent option for `JSON.stringify` (defaults to two spaces `` )

### Returns:

- (`String`) — Returns String or Error

String ::createString(data, opts) Source

Public: Converts an Object into a String of the desired format If the format option is not specified, we default to CSON data - Object The data to convert opts - Object The options (options may also be forwarded onto the parser library) :format - String The format to use: "cson" (default), "json", "coffeescript", or "javascript" :cson - Boolean Whether or not the CSON format should be allowed (defaults to `true`) :json - Boolean Whether or not the JSON format should be allowed (defaults to `true`) Returns String or Error

### Parameters:

- (Object) data — Object The data to convert
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (String) format — String The format to use: "cson" (default), "json", "coffeescript", or "javascript"
- (Boolean) cson — Boolean Whether or not the CSON format should be allowed (defaults to `true`)
- (Boolean) json — Boolean Whether or not the JSON format should be allowed (defaults to `true`)

### Returns:

- (`String`) — Returns String or Error

Object ::load(data, opts) Source

Public: Parses a file path of the desired format into an Object If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON data - String The file path to parse opts - Object The options (options may also be forwarded onto the parser library) :format - String The format to use: "cson" (default), "json", "coffeescript", or "javascript" :cson - Boolean Whether or not the CSON format should be allowed (defaults to `true`) :json - Boolean Whether or not the JSON format should be allowed (defaults to `true`) :coffeescript - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`) :json - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`) Returns Object or Error

### Parameters:

- (String) data — String The file path to parse
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (String) format — String The format to use: "cson" (default), "json", "coffeescript", or "javascript"
- (Boolean) cson — Boolean Whether or not the CSON format should be allowed (defaults to `true`)
- (Boolean) json — Boolean Whether or not the JSON format should be allowed (defaults to `true`)
- (Boolean) coffeescript — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`)
- (Boolean) json — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`)

### Returns:

- (`Object`) — Returns Object or Error

Object ::parse(data, opts) Source

Public: Converts a String of the desired format into an Object If the format option is not specified, we default to CSON data - String The string to parse opts - Object The options (options may also be forwarded onto the parser library) :format - String The format to use: "cson" (default), "json", "coffeescript", or "javascript" :cson - Boolean Whether or not the CSON format should be allowed (defaults to `true`) :json - Boolean Whether or not the JSON format should be allowed (defaults to `true`) :coffeescript - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`) :json - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`) Returns Object or Error

### Parameters:

- (String) data — String The string to parse
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (String) format — String The format to use: "cson" (default), "json", "coffeescript", or "javascript"
- (Boolean) cson — Boolean Whether or not the CSON format should be allowed (defaults to `true`)
- (Boolean) json — Boolean Whether or not the JSON format should be allowed (defaults to `true`)
- (Boolean) coffeescript — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`)
- (Boolean) json — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`)

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseCSFile(file, opts) Source

Public: Parses a CoffeeScript file into an Object data - String The file path to parse opts - Object The options, forwarded onto ::parseCSString Returns Object or Error

### Parameters:

- (String) data — String The file path to parse
- (Object) opts — Object The options, forwarded onto ::parseCSString

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseCSONFile(file, opts) Source

Public: Parses a CSON file into an Object data - String The file path to parse opts - Object The options, forwarded onto ::parseCSONString Returns Object or Error

### Parameters:

- (String) data — String The file path to parse
- (Object) opts — Object The options, forwarded onto ::parseCSONString

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseCSONString(data, opts) Source

Public: Parses a CSON String into an Object data - The CSON String to parse opts - Object The options, unused Returns Object or Error

### Parameters:

- (String) data — The CSON String to parse
- (Object) opts — Object The options, unused

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseCSString(data, opts) Source

Public: Parses a CoffeeScript String into an Object data - The CoffeeScript String to parse opts - Object The options, forwarded onto `require('coffee-scriot').eval` Returns Object or Error

### Parameters:

- (String) data — The CoffeeScript String to parse
- (Object) opts — Object The options, forwarded onto `require('coffee-scriot').eval`

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseFile(data, opts) Source

Public: Parses a file path of the desired format into an Object If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON data - String The file path to parse opts - Object The options (options may also be forwarded onto the parser library) :format - String The format to use: "cson" (default), "json", "coffeescript", or "javascript" :cson - Boolean Whether or not the CSON format should be allowed (defaults to `true`) :json - Boolean Whether or not the JSON format should be allowed (defaults to `true`) :coffeescript - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`) :json - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`) Returns Object or Error

### Parameters:

- (String) data — String The file path to parse
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (String) format — String The format to use: "cson" (default), "json", "coffeescript", or "javascript"
- (Boolean) cson — Boolean Whether or not the CSON format should be allowed (defaults to `true`)
- (Boolean) json — Boolean Whether or not the JSON format should be allowed (defaults to `true`)
- (Boolean) coffeescript — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`)
- (Boolean) json — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`)

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseJSFile(file, opts) Source

Public: Parses a JAvaScript file into an Object data - String The file path to parse opts - Object The options, forwarded onto ::parseJSString Returns Object or Error

### Parameters:

- (String) data — String The file path to parse
- (Object) opts — Object The options, forwarded onto ::parseJSString

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseJSONFile(file, opts) Source

Public: Parses a JSON file into an Object data - String The file path to parse opts - Object The options, forwarded onto ::parseJSONString Returns Object or Error

### Parameters:

- (String) data — String The file path to parse
- (Object) opts — Object The options, forwarded onto ::parseJSONString

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseJSONString(data, opts) Source

Public: Parses a JSON String into an Object data - The JSON String to parse opts - Object The options, unused Returns Object or Error

### Parameters:

- (String) data — The JSON String to parse
- (Object) opts — Object The options, unused

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseJSString(data, opts) Source

Public: Parses a JavaScript String into an Object data - The JavaScript String to parse opts - Object The options :content - Object The context option that is used in `require('vm').runInNewContext`, defaults to an empty object `` :filename - Object The filename option that is used in `require('vm').runInNewContext`, defaults to the filename if specified Returns Object or Error

### Parameters:

- (String) data — The JavaScript String to parse
- (Object) opts — Object The options

- (Object) content — Object The context option that is used in `require('vm').runInNewContext`, defaults to an empty object `{}`
- (Object) filename — Object The filename option that is used in `require('vm').runInNewContext`, defaults to the filename if specified

### Returns:

- (`Object`) — Returns Object or Error

Object ::parseString(data, opts) Source

Public: Converts a String of the desired format into an Object If the format option is not specified, we default to CSON data - String The string to parse opts - Object The options (options may also be forwarded onto the parser library) :format - String The format to use: "cson" (default), "json", "coffeescript", or "javascript" :cson - Boolean Whether or not the CSON format should be allowed (defaults to `true`) :json - Boolean Whether or not the JSON format should be allowed (defaults to `true`) :coffeescript - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`) :json - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`) Returns Object or Error

### Parameters:

- (String) data — String The string to parse
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (String) format — String The format to use: "cson" (default), "json", "coffeescript", or "javascript"
- (Boolean) cson — Boolean Whether or not the CSON format should be allowed (defaults to `true`)
- (Boolean) json — Boolean Whether or not the JSON format should be allowed (defaults to `true`)
- (Boolean) coffeescript — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`)
- (Boolean) json — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`)

### Returns:

- (`Object`) — Returns Object or Error

Object ::require(data, opts) Source

Public: Requires or parses a file path of the desired format into an Object If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON data - String The file path to require or parse opts - Object The options (options may also be forwarded onto the parser library) :format - String The format to use: "cson" (default), "json", "coffeescript", or "javascript" :cson - Boolean Whether or not the CSON format should be allowed (defaults to `true`) :json - Boolean Whether or not the JSON format should be allowed (defaults to `true`) :coffeescript - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`) :json - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`) Returns Object or Error

### Parameters:

- (String) data — String The file path to require or parse
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (String) format — String The format to use: "cson" (default), "json", "coffeescript", or "javascript"
- (Boolean) cson — Boolean Whether or not the CSON format should be allowed (defaults to `true`)
- (Boolean) json — Boolean Whether or not the JSON format should be allowed (defaults to `true`)
- (Boolean) coffeescript — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`)
- (Boolean) json — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`)

### Returns:

- (`Object`) — Returns Object or Error

Object ::requireCSFile(file, opts) Source

Public: Requires a CoffeeScript file and returns the result Object data - String The file path to require opts - Object The options, unused Returns Object or Error

### Parameters:

- (String) data — String The file path to require
- (Object) opts — Object The options, unused

### Returns:

- (`Object`) — Returns Object or Error

Object ::requireCSONFile(file, opts) Source

Public: Parses a CSON file into an Object data - String The file path to parse opts - Object The options, forwarded onto ::parseCSONString Returns Object or Error

### Parameters:

- (String) data — String The file path to parse
- (Object) opts — Object The options, forwarded onto ::parseCSONString

### Returns:

- (`Object`) — Returns Object or Error

Object ::requireFile(data, opts) Source

Public: Requires or parses a file path of the desired format into an Object If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON data - String The file path to require or parse opts - Object The options (options may also be forwarded onto the parser library) :format - String The format to use: "cson" (default), "json", "coffeescript", or "javascript" :cson - Boolean Whether or not the CSON format should be allowed (defaults to `true`) :json - Boolean Whether or not the JSON format should be allowed (defaults to `true`) :coffeescript - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`) :json - Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`) Returns Object or Error

### Parameters:

- (String) data — String The file path to require or parse
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (String) format — String The format to use: "cson" (default), "json", "coffeescript", or "javascript"
- (Boolean) cson — Boolean Whether or not the CSON format should be allowed (defaults to `true`)
- (Boolean) json — Boolean Whether or not the JSON format should be allowed (defaults to `true`)
- (Boolean) coffeescript — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `false`)
- (Boolean) json — Boolean Whether or not the CoffeeScript format should be allowed (defaults to `json`)

### Returns:

- (`Object`) — Returns Object or Error

Object ::requireJSFile(file, opts) Source

Public: Requires a JavaScript file and returns the result Object data - String The file path to require opts - Object The options, unused Returns Object or Error

### Parameters:

- (String) data — String The file path to require
- (Object) opts — Object The options, unused

### Returns:

- (`Object`) — Returns Object or Error

Object ::requireJSONFile(file, opts) Source

Public: Parses a JSON file into an Object data - String The file path to parse opts - Object The options, forwarded onto ::parseJSONString Returns Object or Error

### Parameters:

- (String) data — String The file path to parse
- (Object) opts — Object The options, forwarded onto ::parseJSONString

### Returns:

- (`Object`) — Returns Object or Error

String ::stringify(data, opts) Source

Public: Converts an Object into a String of the desired format If the format option is not specified, we default to CSON data - Object The data to convert opts - Object The options (options may also be forwarded onto the parser library) :format - String The format to use: "cson" (default), "json", "coffeescript", or "javascript" :cson - Boolean Whether or not the CSON format should be allowed (defaults to `true`) :json - Boolean Whether or not the JSON format should be allowed (defaults to `true`) Returns String or Error

### Parameters:

- (Object) data — Object The data to convert
- (Object) opts — Object The options (options may also be forwarded onto the parser library)

- (String) format — String The format to use: "cson" (default), "json", "coffeescript", or "javascript"
- (Boolean) cson — Boolean Whether or not the CSON format should be allowed (defaults to `true`)
- (Boolean) json — Boolean Whether or not the JSON format should be allowed (defaults to `true`)

### Returns:

- (`String`) — Returns String or Error