This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| class ViewController: UIViewController { | |
| var isFirst = true | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| // Do any additional setup after loading the view, typically from a nib. | |
| } | |
| override func didReceiveMemoryWarning() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var TEXT_NODE = 3; | |
| var ELEMENT_NODE = 1; | |
| var ENOUGH = 0; | |
| var TOO_MUCH = 1; | |
| var NOT_ENOUGH = -1; | |
| var splitBy = ['.', '-', '–', '—', ' ']; | |
| var cleanupElementsList = ['br', 'img', 'video', 'audio', 'hr']; | |
| var clampSymbol = '... [Read More]'; | |
| function computeStyle(elem, prop) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import _ from 'lodash'; | |
| const morf = { | |
| 'array': (source, scheme) => source.map(i => scheme ? getDataByScheme(scheme, i) : i), | |
| 'object': (source, scheme) => scheme ? getDataByScheme(scheme, source) : _.deepClone(source), | |
| 'enumObject': (source, scheme) => scheme ? _.keys(source).reduce((a, i) => (a[i] = getDataByScheme(scheme, source[i]), a), {}): _.deepClone(source), | |
| 'identity': source => source | |
| }; | |
| const getDataByScheme = (scheme, source) => _.keys(scheme).reduce((acc, prop) => ((prop in source) && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --log_gc (Log heap samples on garbage collection for the hp2ps tool.) | |
| type: bool default: false | |
| --expose_gc (expose gc extension) | |
| type: bool default: false | |
| --max_new_space_size (max size of the new generation (in kBytes)) | |
| type: int default: 0 | |
| --max_old_space_size (max size of the old generation (in Mbytes)) | |
| type: int default: 0 | |
| --max_executable_size (max size of executable memory (in Mbytes)) | |
| type: int default: 0 |