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
| const | |
| util = require('util'), | |
| stream = require('stream'), | |
| Readable = stream.Readable, | |
| packageJson = require('../package'); | |
| function VersionNumberReadStream (options) { | |
| Readable.call(this, Object.assign({ | |
| encoding: 'utf8', | |
| objectMode: false, |
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
| define(function () { | |
| 'use strict'; | |
| var typeofIsObject = function (value) { return typeof value === 'object'; }, | |
| hasOwnProperty = function (obj, key) { return Object.prototype.hasOwnProperty.call(obj, key) }; | |
| function deepEquals (obj1, obj2) { | |
| return Object.keys(obj1).every(function (key) { | |
| if (!hasOwnProperty(obj2, key)) { |
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
| /** | |
| * Created by elydelacruz on 11/8/16. | |
| * Simple function to extract delimited content from a string. | |
| */ | |
| 'use strict'; | |
| /** | |
| * Returns whether our content has opening and closing delimiters. | |
| * @param content {String} |
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
| // Simple fibonacci series generator. Generates fibonacci series from 0 to `limit` number. | |
| function fib (limit) { | |
| var out = [], | |
| a = 0, | |
| b = 1; | |
| while (a < limit) { | |
| out.push(a); | |
| if (b <= limit) { | |
| out.push(b); | |
| } |
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
| /** | |
| * 'Fast Remainder' method for number to hex. | |
| * @see http://www.wikihow.com/Convert-from-Decimal-to-Hexadecimal (fast remainder method (method 2)). | |
| */ | |
| const hexMap = [ | |
| [0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], | |
| [6, 6], [7, 7], [8, 8], [9, 9], [10, 'A'], [11, 'B'], | |
| [12, 'C'], [13, 'D'], [14, 'E'], [15, 'F'] | |
| ]; |
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
| /** | |
| * Created by Ely on 5/22/2015. | |
| */ | |
| require('sjljs'); | |
| var path = require('path'), | |
| fs = require('fs'); | |
| var Namespace = sjl.Extendable.extend(function Namespace (dir, allowedFileExts) { |
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
Show hidden characters
| { | |
| "maxerr" : 50, // {int} Maximum error before stopping | |
| // Enforcing | |
| "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
| "camelcase" : false, // true: Identifiers must be in camelCase | |
| "curly" : false, // true: Require {} for every new block or scope | |
| "eqeqeq" : true, // true: Require triple equals (===) for comparison | |
| "forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty() | |
| "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` |
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
| # --------------------------------------------------------------------------------------------------------------------- # | |
| # Conversion of http://eslint.org/docs/rules/ to an actual .eslintrc file: | |
| # Copied: 04/01/2015 | |
| # Updated to yaml format: 05/15/2015 | |
| # Copied by: Ely De La Cruz <[email protected]> | |
| # --------------------------------------------------------------------------------------------------------------------- # | |
| # --------------------------------------------------------------------------------------------------------------------- # | |
| # Environemnt Types: | |
| # --------------------------------------------------------------------------------------------------------------------- # |
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
| /** | |
| Conversion of http://eslint.org/docs/rules/ to an actual .eslintrc file: | |
| Copied: 04/01/2015 | |
| Copied by: Ely De La Cruz <[email protected]> | |
| */ | |
| /** | |
| Rules: | |
| Rules in ESLint are divided into several categories to help you better understand their value. Additionally, not all rules are enabled by default. Those that are not enabled by default are marked as being off. | |
| **-------------------------------------------------------------------------------------------------------------------**/ |
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
| /** | |
| * Creates and appends a script tag to the `document` at `insertLocation`. (This snippet is a good candidate for adding an | |
| * interval or a timeout on the returned $.deffered|HTMLScriptElement) | |
| * @param options hash of the following parameters: | |
| * @param src {String|HTMLScriptElement} - Script source or script element. Required. | |
| * @param doc {document} - `document` object. Optional. Default `document`. | |
| * @param insertLocation {String} - Location at which to insert the script tag [head,body]. Optional. Default 'body'. | |
| * @param onError {Function} - On error callback. Optional. If `$.getScript` is available these callbacks gets passed to `.fail()`. | |
| * @param onSuccess {Function} - On success/completion callback. Optional. | |
| * @param useGetScript {Boolean} - Whether to use `$.getScript` if it is available. Optional. Default `false`. |