Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / chain-able-lego   js

Repository URL to install this package:

Version: 6.0.4 

/ src / universeView.ddd

import isObjPure from '../src/deps/is/objPure'
import curry from '../src/deps/fp/curry'
import always from '../src/deps/fp/always'
import argumentsToArray from '../src/deps/cast/argumentsToArray'
import hasOwnProperty from '../src/deps/util/hasOwnProperty'
import getPrototypeOf from '../src/deps/util/getPrototypeOf'
import noop from '../src/deps/util/noop'
import size from '../src/deps/util/size'
import { zipFromArrayObjToObj, zipToObj } from './zipToObj'
import { compareByLength } from './compareByLength'
import { sortObj } from './sortObj'
import { filterKeysFor } from './filterKeysFor'





// localGlobal().toUniverseView = toUniverseView

// const filteredKeysWith = curry(2, filterKeysFor)
// const filterKeysIncluding = pipe(filteredKeysWith('_', includes))

// Uncaught TypeError: Cannot assign to read only property 'undefined' of object '#<Window>'
// if (typeof window !== 'undefined') {
//   window.toUniverseView = toUniverseView
//   window.null = 'Nullary?'
// (function() {
//     var undefined = 'Undefinedy'
//     window.undefined = undefined
//   })()
// }

// console.log(null)

// http://perfectionkills.com/extending-native-builtins/
// https://github.com/tc39/proposal-pipeline-operator#introduction
// https://www.gideonpyzer.com/blog/debugging-javascript-by-redefining-properties/

// https://lostechies.com/derickbailey/2013/07/29/prototypes-constructor-functions-and-taxidermy/

// https://github.com/gilbert/babel/commit/415b56ba5248286af53632cea0b36d84b09888bc
// https://github.com/michaelmitchell/babel-plugin-pipe-composition
// https://github.com/gilbert/es-papp#constructing-user-friendly-apis
// https://github.com/tc39/proposal-pipeline-operator#introduction
// Function.prototype.papp = function() {
//   var slice = Array.prototype.slice
//   var fn = this
//   var args = slice.call(arguments)
//   return function() {
//     return fn.apply(this, args.concat(slice.call(arguments)))
//   }
// }

// https://hackernoon.com/javascript-cracking-nuts-override-object-constructor-48a73628b7e6
// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor

// const toStringObjRef = Object.prototype.toString
// const hasOwnPropertyRef = Object.prototype.hasOwnProperty

// Object.prototype.hasOwnProperty = function() {
//   if (this == null) return false
//   return hasOwnPropertyRef.call(this)
// }
// Object.prototype.hasOwnProperty[Symbol.toString] = '[Native code]'

// http://me.dt.in.th/page/JavaScript-override/

// http://www.paulgraham.com/langdes.html
// https://gist.github.com/dmethvin/1676346#gistcomment-1732477

// 100%
// https://github.com/kentcdodds/babel-plugin-preval
// https://github.com/vihanb/babel-plugin-loop-optimizer

// meaningful-logs
// https://github.com/azu/babel-plugin-jsdoc-to-assert
// https://github.com/furstenheim/babel-plugin-meaningful-logs
// https://github.com/babel/awesome-babel#types

// http://perfectionkills.com/extending-native-builtins/
// http://blog.getjaco.com/most-ridiculous-monkey-patches-weve-seen/
// https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html
// https://blog.rust-lang.org/2015/05/11/traits.html
// http://docs.scala-lang.org/tutorials/tour/implicit-conversions
// http://learnyouahaskell.com/types-and-typeclasses#typeclasses-101
// https://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/EWD667.html
// https://medium.com/@maxheiber/safe-monkey-patching-with-es2015-symbol-e36fb01ab794
// https://gbracha.blogspot.ca/2008/03/monkey-patching.html
// https://codereview.stackexchange.com/questions/20400/monkey-patching-native-javascript-constructors
// https://github.com/v0lkan/o2.js/issues/109
// https://github.com/Microsoft/TypeScript/issues/1108#issuecomment-71558306
// Object.defineProperty(Object.prototype, 'toFlat', {
//   writable: false,
//   configurable: false,
//   enumerable: false,
//   value: toUniverseView,
//   // get() {
//   //   console.log('get flatten')
//   //   return toUniverseView(this)
//   // },
//   // set(arg) {
//   //   console.log('set flatten')
//   // },
// })

// function construct(aArgs) {
//   var oNew = Object.create(this.prototype)
//   this.apply(oNew, aArgs)
//   return oNew
// }

// function papp() {
//   const self = this
//   const args = argumentsToArray.apply(this, arguments)
//   return function() {
//     return self.apply(
//       this,
//       args.concat(argumentsToArray.apply(this, arguments))
//     )
//   }
// }

// http://vanilla-js.com/
function toFlat() {
  // eslint-disable-next-line
  // debugger
  return toUniverseView(this)
}

// defineFinal(Object.prototype, "toFlat", toFlat)
// defineFinal(Function.prototype, 'papp', papp)
// defineFinal(Function.prototype, 'construct', construct)

// moved to their own file for rollup
// Object.assign(toUniverseView, {
//   toUniverseView,
//   filterKeysFor,
//   zipToObj,
//   zipFromArrayObjToObj,
//   // filterKeysIncluding,
//   // filteredKeysWith,
//   // isTyped,
// })