CHANGES 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. v0.10.12 -- 2016.07.01
  2. * Ensure symbols are copied in Object.mixin
  3. * Prevent RangeError errors in array#flatten
  4. * Do not validate invalidate dates in validDate
  5. v0.10.11 -- 2015.12.18
  6. * Ensure that check for implementation of RegExp flags doesn't crash in V8 (thanks @mathiasbynens)
  7. v0.10.10 -- 2015.12.11
  8. * Add Object.isNumberValue util
  9. v0.10.9 -- 2015.12.01
  10. * Add Object.ensureNaturalNumber and Object.ensureNaturalNumberValue
  11. v0.10.8 -- 2015.10.02
  12. * Add Number.isNatural
  13. * Add Object.find and Object.findKey
  14. * Support arrays in Object.copyDeep
  15. * Fix iteration issue in forEachRight and someRight
  16. * Fix detection of native sinh
  17. * Depend on es6-symbol v3
  18. v0.10.7 -- 2015.04.22
  19. * New utlitities. They're convention differs from v0.10, as they were supposed to land in v1.
  20. Still they're non breaking and start the conventions to be used in v1
  21. * Object.validateArrayLike
  22. * Object.validateArrayLikeObject
  23. * Object.validateStringifiable
  24. * Object.validateStringifiableValue
  25. * Universal utilities for array-like/iterable objects
  26. * Iterable.is
  27. * Iterable.validate
  28. * Iterable.validateObject
  29. * Iterable.forEach
  30. * Fix camelToHyphen resolution, it must be absolutely reversable by hyphenToCamel
  31. * Fix calculations of large numbers in Math.tanh
  32. * Fix algorithm of Math.sinh
  33. * Fix indexes to not use real symbols
  34. * Fix length of String.fromCodePoint
  35. * Fix tests of Array#copyWithin
  36. * Update Travis CI configuration
  37. v0.10.6 -- 2015.02.02
  38. * Fix handling of infinite values in Math.trunc
  39. * Fix handling of getters in Object.normalizeOptions
  40. v0.10.5 -- 2015.01.20
  41. * Add Function#toStringTokens
  42. * Add Object.serialize and Object.unserialize
  43. * Add String.randomUniq
  44. * Fix Strin#camelToHyphen issue with tokens that end with digit
  45. * Optimise Number.isInteger logic
  46. * Improve documentation
  47. * Configure lint scripts
  48. * Fix spelling of LICENSE
  49. v0.10.4 -- 2014.04.30
  50. * Assure maximum spec compliance of Array.of and Array.from (thanks @mathiasbynens)
  51. * Improve documentations
  52. v0.10.3 -- 2014.04.29
  53. Provide accurate iterators handling:
  54. * Array.from improvements:
  55. * Assure right unicode symbols resolution when processing strings in Array.from
  56. * Rely on ES6 symbol shim and use native @@iterator Symbol if provided by environment
  57. * Add methods:
  58. * Array.prototype.entries
  59. * Array.prototype.keys
  60. * Array.prototype.values
  61. * Array.prototype[@@iterator]
  62. * String.prototype[@@iterator]
  63. Improve documentation
  64. v0.10.2 -- 2014.04.24
  65. - Simplify and deprecate `isCallable`. It seems in ES5 based engines there are
  66. no callable objects which are `typeof obj !== 'function'`
  67. - Update Array.from map callback signature (up to latest resolution of TC39)
  68. - Improve documentation
  69. v0.10.1 -- 2014.04.14
  70. Bump version for npm
  71. (Workaround for accidental premature publish & unpublish of v0.10.0 a while ago)
  72. v0.10.0 -- 2014.04.13
  73. Major update:
  74. - All methods and function specified for ECMAScript 6 are now introduced as
  75. shims accompanied with functions through which (optionally) they can be
  76. implementend on native objects
  77. - Filename convention was changed to shorter and strictly lower case names. e.g.
  78. `lib/String/prototype/starts-with` became `string/#/starts-with`
  79. - Generated functions are guaranteed to have expected length
  80. - Objects with null prototype (created via `Object.create(null)`) are widely
  81. supported (older version have crashed due to implied `obj.hasOwnProperty` and
  82. related invocations)
  83. - Support array subclasses
  84. - When handling lists do not limit its length to Uint32 range
  85. - Use newly introduced `Object.eq` for strict equality in place of `Object.is`
  86. - Iteration of Object have been improved so properties that were hidden or
  87. removed after iteration started are not iterated.
  88. Additions:
  89. - `Array.isPlainArray`
  90. - `Array.validArray`
  91. - `Array.prototype.concat` (as updated with ES6)
  92. - `Array.prototype.copyWithin` (as introduced with ES6)
  93. - `Array.prototype.fill` (as introduced with ES6)
  94. - `Array.prototype.filter` (as updated with ES6)
  95. - `Array.prototype.findIndex` (as introduced with ES6)
  96. - `Array.prototype.map` (as updated with ES6)
  97. - `Array.prototype.separate`
  98. - `Array.prototype.slice` (as updated with ES6)
  99. - `Array.prototype.splice` (as updated with ES6)
  100. - `Function.prototype.copy`
  101. - `Math.acosh` (as introduced with ES6)
  102. - `Math.atanh` (as introduced with ES6)
  103. - `Math.cbrt` (as introduced with ES6)
  104. - `Math.clz32` (as introduced with ES6)
  105. - `Math.cosh` (as introduced with ES6)
  106. - `Math.expm1` (as introduced with ES6)
  107. - `Math.fround` (as introduced with ES6)
  108. - `Math.hypot` (as introduced with ES6)
  109. - `Math.imul` (as introduced with ES6)
  110. - `Math.log2` (as introduced with ES6)
  111. - `Math.log10` (as introduced with ES6)
  112. - `Math.log1p` (as introduced with ES6)
  113. - `Math.sinh` (as introduced with ES6)
  114. - `Math.tanh` (as introduced with ES6)
  115. - `Math.trunc` (as introduced with ES6)
  116. - `Number.EPSILON` (as introduced with ES6)
  117. - `Number.MIN_SAFE_INTEGER` (as introduced with ES6)
  118. - `Number.MAX_SAFE_INTEGER` (as introduced with ES6)
  119. - `Number.isFinite` (as introduced with ES6)
  120. - `Number.isInteger` (as introduced with ES6)
  121. - `Number.isSafeInteger` (as introduced with ES6)
  122. - `Object.create` (with fix for V8 issue which disallows prototype turn of
  123. objects derived from null
  124. - `Object.eq` - Less restrictive version of `Object.is` based on SameValueZero
  125. algorithm
  126. - `Object.firstKey`
  127. - `Object.keys` (as updated with ES6)
  128. - `Object.mixinPrototypes`
  129. - `Object.primitiveSet`
  130. - `Object.setPrototypeOf` (as introduced with ES6)
  131. - `Object.validObject`
  132. - `RegExp.escape`
  133. - `RegExp.prototype.match` (as introduced with ES6)
  134. - `RegExp.prototype.replace` (as introduced with ES6)
  135. - `RegExp.prototype.search` (as introduced with ES6)
  136. - `RegExp.prototype.split` (as introduced with ES6)
  137. - `RegExp.prototype.sticky` (as introduced with ES6)
  138. - `RegExp.prototype.unicode` (as introduced with ES6)
  139. - `String.fromCodePoint` (as introduced with ES6)
  140. - `String.raw` (as introduced with ES6)
  141. - `String.prototype.at`
  142. - `String.prototype.codePointAt` (as introduced with ES6)
  143. - `String.prototype.normalize` (as introduced with ES6)
  144. - `String.prototype.plainReplaceAll`
  145. Removals:
  146. - `reserved` set
  147. - `Array.prototype.commonLeft`
  148. - `Function.insert`
  149. - `Function.remove`
  150. - `Function.prototype.silent`
  151. - `Function.prototype.wrap`
  152. - `Object.descriptor` Move to external `d` project.
  153. See: https://github.com/medikoo/d
  154. - `Object.diff`
  155. - `Object.extendDeep`
  156. - `Object.reduce`
  157. - `Object.values`
  158. - `String.prototype.trimCommonLeft`
  159. Renames:
  160. - `Function.i` into `Function.identity`
  161. - `Function.k` into `Function.constant`
  162. - `Number.toInt` into `Number.toInteger`
  163. - `Number.toUint` into `Number.toPosInteger`
  164. - `Object.extend` into `Object.assign` (as introduced in ES 6)
  165. - `Object.extendProperties` into `Object.mixin`, with improved internal
  166. handling, so it matches temporarily specified `Object.mixin` for ECMAScript 6
  167. - `Object.isList` into `Object.isArrayLike`
  168. - `Object.mapToArray` into `Object.toArray` (with fixed function length)
  169. - `Object.toPlainObject` into `Object.normalizeOptions` (as this is the real
  170. use case where we use this function)
  171. - `Function.prototype.chain` into `Function.prototype.compose`
  172. - `Function.prototype.match` into `Function.prototype.spread`
  173. - `String.prototype.format` into `String.formatMethod`
  174. Improvements & Fixes:
  175. - Remove workaround for primitive values handling in object iterators
  176. - `Array.from`: Update so it follows ES 6 spec
  177. - `Array.prototype.compact`: filters just null and undefined values
  178. (not all falsies)
  179. - `Array.prototype.eIndexOf` and `Array.prototype.eLastIndexOf`: fix position
  180. handling, improve internals
  181. - `Array.prototype.find`: return undefined not null, in case of not found
  182. (follow ES 6)
  183. - `Array.prototype.remove` fix function length
  184. - `Error.custom`: simplify, Custom class case is addressed by outer
  185. `error-create` project -> https://github.com/medikoo/error-create
  186. - `Error.isError` true only for Error instances (remove detection of host
  187. Exception objects)
  188. - `Number.prototype.pad`: Normalize negative pad
  189. - `Object.clear`: Handle errors same way as in `Object.assign`
  190. - `Object.compact`: filters just null and undefined values (not all falsies)
  191. - `Object.compare`: Take into account NaN values
  192. - `Object.copy`: Split into `Object.copy` and `Object.copyDeep`
  193. - `Object.isCopy`: Separate into `Object.isCopy` and `Object.isCopyDeep`, where
  194. `isCopyDeep` handles nested plain objects and plain arrays only
  195. - `String.prototype.endsWith`: Adjust up to ES6 specification
  196. - `String.prototype.repeat`: Adjust up to ES6 specification and improve algorithm
  197. - `String.prototype.simpleReplace`: Rename into `String.prototype.plainReplace`
  198. - `String.prototype.startsWith`: Adjust up to ES6 specification
  199. - Update lint rules, and adjust code to that
  200. - Update Travis CI configuration
  201. - Remove Makefile (it's cross-env utility)
  202. v0.9.2 -- 2013.03.11
  203. Added:
  204. * Array.prototype.isCopy
  205. * Array.prototype.isUniq
  206. * Error.CustomError
  207. * Function.validFunction
  208. * Object.extendDeep
  209. * Object.descriptor.binder
  210. * Object.safeTraverse
  211. * RegExp.validRegExp
  212. * String.prototype.capitalize
  213. * String.prototype.simpleReplace
  214. Fixed:
  215. * Fix Array.prototype.diff for sparse arrays
  216. * Accept primitive objects as input values in Object iteration methods and
  217. Object.clear, Object.count, Object.diff, Object.extend,
  218. Object.getPropertyNames, Object.values
  219. * Pass expected arguments to callbacks of Object.filter, Object.mapKeys,
  220. Object.mapToArray, Object.map
  221. * Improve callable callback support in Object.mapToArray
  222. v0.9.1 -- 2012.09.17
  223. * Object.reduce - reduce for hash-like collections
  224. * Accapt any callable object as callback in Object.filter, mapKeys and map
  225. * Convention cleanup
  226. v0.9.0 -- 2012.09.13
  227. We're getting to real solid API
  228. Removed:
  229. * Function#memoize - it's grown up to be external package, to be soon published
  230. as 'memoizee'
  231. * String.guid - it doesn't fit es5-ext (extensions) concept, will be provided as
  232. external package
  233. # Function.arguments - obsolete
  234. # Function.context - obsolete
  235. # Function#flip - not readable when used, so it was never used
  236. # Object.clone - obsolete and confusing
  237. Added:
  238. * String#camelToHyphen - String format convertion
  239. Renamed:
  240. * String#dashToCamelCase -> String#hyphenToCamel
  241. Fixes:
  242. * Object.isObject - Quote names in literals that match reserved keywords
  243. (older implementations crashed on that)
  244. * String#repeat - Do not accept negative values (coerce them to 1)
  245. Improvements:
  246. * Array#remove - Accepts many arguments, we can now remove many values at once
  247. * Object iterators (forEach, map, some) - Compare function invoked with scope
  248. object bound to this
  249. * Function#curry - Algorithm cleanup
  250. * Object.isCopy - Support for all types, not just plain objects
  251. * Object.isPlainObject - Support for cross-frame objects
  252. * Do not memoize any of the functions, it shouldn't be decided internally
  253. * Remove Object.freeze calls in reserved, it's not up to convention
  254. * Improved documentation
  255. * Better linting (hard-core approach using both JSLint mod and JSHint)
  256. * Optional arguments are now documented in funtions signature
  257. v0.8.2 -- 2012.06.22
  258. Fix errors in Array's intersection and exclusion methods, related to improper
  259. usage of contains method
  260. v0.8.1 -- 2012.06.13
  261. Reorganized internal logic of Function.prototype.memoize. So it's more safe now
  262. and clears cache properly. Additionally preventCache option was provided.
  263. v0.8.0 -- 2012.05.28
  264. Again, major overhaul. Probably last experimental stuff was trashed, all API
  265. looks more like standard extensions now.
  266. Changes:
  267. * Turn all Object.prototype extensions into functions and move them to Object
  268. namespace. We learned that extending Object.prototype is bad idea in any case.
  269. * Rename Function.prototype.curry into Function.prototype.partial. This function
  270. is really doing partial application while currying is slightly different
  271. concept.
  272. * Convert Function.prototype.ncurry to new implementation of
  273. Function.prototype.curry, it now serves real curry concept additionaly it
  274. covers use cases for aritize and hold, which were removed.
  275. * Rename Array's peek to last, and provide support for sparse arrays in it
  276. * Rename Date's monthDaysCount into daysInMonth
  277. * Simplify object iterators, now order of iteration can be configured with just
  278. compareFn argument (no extra byKeys option)
  279. * Rename Object.isDuplicate to Object.isCopy
  280. * Rename Object.isEqual to Object.is which is compatible with future 'is'
  281. keyword
  282. * Function.memoize is now Function.prototype.memoize. Additionally clear cache
  283. functionality is added, and access to original arguments object.
  284. * Rename validation functions: assertNotNull to validValue, assertCallable to
  285. validCallable. validValue was moved to Object namespace. On success they now
  286. return validated value instead of true, it supports better composition.
  287. Additionally created Date.validDate and Error.validError
  288. * All documentation is now held in README.md not in code files.
  289. * Move guid to String namespace. All guids now start with numbers.
  290. * Array.generate: fill argument is now optional
  291. * Object.toArray is now Array.from (as new ES6 specification draft suggests)
  292. * All methods that rely on indexOf or lastIndexOf, now rely on egal (Object.is)
  293. versions of them (eIndexOf, eLastIndexOf)
  294. * Turn all get* functions that returned methods into actuall methods (get*
  295. functionality can still be achieved with help of Function.prototype.partial).
  296. So: Date.getFormat is now Date.prototype.format,
  297. Number.getPad is now Number.prototype.pad,
  298. String.getFormat is now String.prototype.format,
  299. String.getIndent is now String.prototype.indent,
  300. String.getPad is now String.prototype.pad
  301. * Refactored Object.descriptor, it is now just two functions, main one and
  302. main.gs, main is for describing values, and gs for describing getters and
  303. setters. Configuration is passed with first argument as string e.g. 'ce' for
  304. configurable and enumerable. If no configuration string is provided then by
  305. default it returns configurable and writable but not enumerable for value or
  306. configurable but not enumerable for getter/setter
  307. * Function.prototype.silent now returns prepared function (it was
  308. expected to be fixed for 0.7)
  309. * Reserved keywords map (reserved) is now array not hash.
  310. * Object.merge is now Object.extend (while former Object.extend was completely
  311. removed) - 'extend' implies that we change object, not creating new one (as
  312. 'merge' may imply). Similarily Object.mergeProperties was renamed to
  313. Object.extendProperties
  314. * Position argument support in Array.prototype.contains and
  315. String.prototype.contains (so it follows ES6 specification draft)
  316. * endPosition argument support in String.prototype.endsWith and fromPosition
  317. argument support in String.prototype.startsWith (so it follows ES6
  318. specification draft)
  319. * Better and cleaner String.prototype.indent implementation. No default value
  320. for indent string argument, optional nest value (defaults to 1), remove
  321. nostart argument
  322. * Correct length values for most methods (so they reflect length of similar
  323. methods in standard)
  324. * Length argument is now optional in number and string pad methods.
  325. * Improve arguments validation in general, so it adheres to standard conventions
  326. * Fixed format of package.json
  327. Removed methods and functions:
  328. * Object.prototype.slice - Object is not ordered collection, so slice doesn't
  329. make sense.
  330. * Function's rcurry, rncurry, s - too cumbersome for JS, not many use cases for
  331. that
  332. * Function.prototype.aritize and Function.prototype.hold - same functionality
  333. can be achieved with new Function.prototype.curry
  334. * Function.prototype.log - provided more generic Function.prototype.wrap for
  335. same use case
  336. * getNextIdGenerator - no use case for that (String.guid should be used if
  337. needed)
  338. * Object.toObject - Can be now acheived with Object(validValue(x))
  339. * Array.prototype.someValue - no real use case (personally used once and
  340. case was already controversial)
  341. * Date.prototype.duration - moved to external package
  342. * Number.getAutoincrement - No real use case
  343. * Object.prototype.extend, Object.prototype.override,
  344. Object.prototype.plainCreate, Object.prototype.plainExtend - It was probably
  345. too complex, same should be achieved just with Object.create,
  346. Object.descriptor and by saving references to super methods in local scope.
  347. * Object.getCompareBy - Functions should be created individually for each use
  348. case
  349. * Object.get, Object.getSet, Object.set, Object.unset - Not many use cases and
  350. same can be easily achieved with simple inline function
  351. * String.getPrefixWith - Not real use case for something that can be easily
  352. achieved with '+' operator
  353. * Object.isPrimitive - It's just negation of Object.isObject
  354. * Number.prototype.isLess, Number.prototype.isLessOrEqual - they shouldn't be in
  355. Number namespace and should rather be addressed with simple inline functions.
  356. * Number.prototype.subtract - Should rather be addressed with simple inline
  357. function
  358. New methods and functions:
  359. * Array.prototype.lastIndex - Returns last declared index in array
  360. * String.prototype.last - last for strings
  361. * Function.prototype.wrap - Wrap function with other, it allows to specify
  362. before and after behavior transform return value or prevent original function
  363. from being called.
  364. * Math.sign - Returns sign of a number (already in ES6 specification draft)
  365. * Number.toInt - Converts value to integer (already in ES6 specification draft)
  366. * Number.isNaN - Returns true if value is NaN (already in ES6 specification
  367. draft)
  368. * Number.toUint - Converts value to unsigned integer
  369. * Number.toUint32 - Converts value to 32bit unsigned integer
  370. * Array.prototype.eIndexOf, eLastIndexOf - Egal version (that uses Object.is) of
  371. standard methods (all methods that were using native indexOf or lastIndexOf
  372. now uses eIndexOf and elastIndexOf respectively)
  373. * Array.of - as it's specified for ES6
  374. Fixes:
  375. * Fixed binarySearch so it always returns valid list index
  376. * Object.isList - it failed on lists that are callable (e.g. NodeList in Nitro
  377. engine)
  378. * Object.map now supports third argument for callback
  379. v0.7.1 -- 2012.01.05
  380. New methods:
  381. * Array.prototype.firstIndex - returns first valid index of array (for
  382. sparse arrays it may not be '0'
  383. Improvements:
  384. * Array.prototype.first - now returns value for index returned by firstIndex
  385. * Object.prototype.mapToArray - can be called without callback, then array of
  386. key-value pairs is returned
  387. Fixes
  388. * Array.prototype.forEachRight, object's length read through UInt32 conversion
  389. v0.7.0 -- 2011.12.27
  390. Major update.
  391. Stepped back from experimental ideas and introduced more standard approach
  392. taking example from how ES5 methods and functions are designed. One exceptions
  393. is that, we don’t refrain from declaring methods for Object.prototype - it’s up
  394. to developer whether how he decides to use it in his context (as function or as
  395. method).
  396. In general:
  397. * Removed any method 'functionalization' and functionalize method itself.
  398. es5-ext declares plain methods, which can be configured to work as functions
  399. with call.bind(method) - see documentation.
  400. * Removed separation of Object methods for ES5 (with descriptors) and
  401. ES3 (plain) - we're following ES5 idea on that, some methods are intended just
  402. for enumerable properties and some are for all properties, all are declared
  403. for Object.prototype
  404. * Removed separation of Array generic (collected in List folder) and not generic
  405. methods (collected in Array folder). Now all methods are generic and are in
  406. Array/prototype folder. This separation also meant, that methods in Array are
  407. usually destructive. We don’t do that separation now, there’s generally no use
  408. case for destructive iterators, we should be fine with one version of each
  409. method, (same as ES5 is fine with e.g. one, non destructive 'filter' method)
  410. * Folder structure resembles tree of native ES5 Objects
  411. * All methods are written with ES5 conventions in mind, it means that most
  412. methods are generic and can be run on any object. In more detail:
  413. ** Array.prototype and Object.prototype methods can be run on any object (any
  414. not null or undefined value),
  415. ** Date.prototype methods should be called only on Date instances.
  416. ** Function.prototype methods can be called on any callable objects (not
  417. necessarily functions)
  418. ** Number.prototype & String.prototype methods can be called on any value, in
  419. case of Number it it’ll be degraded to number, in case of string it’ll be
  420. degraded to string.
  421. * Travis CI support (only for Node v0.6 branch, as v0.4 has buggy V8 version)
  422. Improvements for existing functions and methods:
  423. * Function.memoize (was Function.cache) is now fully generic, can operate on any
  424. type of arguments and it’s NaN safe (all NaN objects are considered equal)
  425. * Method properties passed to Object.prototype.extend or
  426. Object.prototype.override can aside of _super optionally take prototype object
  427. via _proto argument
  428. * Object iterators: forEach, mapToArray and every can now iterate in specified
  429. order
  430. * pluck, invoke and other functions that return reusable functions or methods
  431. have now their results memoized.
  432. New methods:
  433. * Global: assertNotNull, getNextIdGenerator, guid, isEqual, isPrimitive,
  434. toObject
  435. * Array: generate
  436. * Array.prototype: binarySearch, clear, contains, diff, exclusion, find, first,
  437. forEachRight, group, indexesOf, intersection, remove, someRight, someValue
  438. * Boolean: isBoolean
  439. * Date: isDate
  440. * Function: arguments, context, insert, isArguments, remove
  441. * Function.prototype: not, silent
  442. * Number: getAutoincrement, isNumber
  443. * Number.prototype: isLessOrEqual, isLess, subtract
  444. * Object: assertCallable, descriptor (functions for clean descriptors),
  445. getCompareBy, isCallable, isObject
  446. * Object.prototype: clone (real clone), compact, count, diff, empty,
  447. getPropertyNames, get, keyOf, mapKeys, override, plainCreate, plainExtend,
  448. slice, some, unset
  449. * RegExp: isRegExp
  450. * String: getPrefixWith, isString
  451. * String.prototype: caseInsensitiveCompare, contains, isNumeric
  452. Renamed methods:
  453. * Date.clone -> Date.prototype.copy
  454. * Date.format -> Date.getFormat
  455. * Date/day/floor -> Date.prototype.floorDay
  456. * Date/month/floor -> Date.prototype.floorMonth
  457. * Date/month/year -> Date.prototype.floorYear
  458. * Function.cache -> Function.memoize
  459. * Function.getApplyArg -> Function.prototype.match
  460. * Function.sequence -> Function.prototype.chain
  461. * List.findSameStartLength -> Array.prototype.commonLeft
  462. * Number.pad -> Number.getPad
  463. * Object/plain/clone -> Object.prototype.copy
  464. * Object/plain/elevate -> Object.prototype.flatten
  465. * Object/plain/same -> Object.prototype.isDuplicate
  466. * Object/plain/setValue -> Object.getSet
  467. * String.format -> String.getFormat
  468. * String.indent -> String.getIndent
  469. * String.pad -> String.getPad
  470. * String.trimLeftStr -> String.prototype.trimCommonLeft
  471. * Object.merge -> Object.prototype.mergeProperties
  472. * Object/plain/pluck -> Object.prototype.get
  473. * Array.clone is now Array.prototype.copy and can be used also on any array-like
  474. objects
  475. * List.isList -> Object.isList
  476. * List.toArray -> Object.prototype.toArray
  477. * String/convert/dashToCamelCase -> String.prototype.dashToCamelCase
  478. Removed methods:
  479. * Array.compact - removed destructive version (that operated on same array), we
  480. have now non destructive version as Array.prototype.compact.
  481. * Function.applyBind -> use apply.bind directly
  482. * Function.bindBind -> use bind.bind directly
  483. * Function.callBind -> use call.bind directly
  484. * Fuction.clone -> no valid use case
  485. * Function.dscope -> controversial approach, shouldn’t be considered seriously
  486. * Function.functionalize -> It was experimental but standards are standards
  487. * List/sort/length -> It can be easy obtained by Object.getCompareBy(‘length’)
  488. * List.concat -> Concat’s for array-like’s makes no sense, just convert to array
  489. first
  490. * List.every -> Use Array.prototype.every directly
  491. * List.filter -> Use Array.prototype.filter directly
  492. * List.forEach -> User Array.prototype.forEach directly
  493. * List.isListObject -> No valid use case, do: isList(list) && (typeof list ===
  494. 'object’)
  495. * List.map -> Use Array.prototype.map directly
  496. * List.reduce -> Use Array.prototype.reduce directly
  497. * List.shiftSame -> Use Array.prototype.commonLeft and do slice
  498. * List.slice -> Use Array.prototype.slice directly
  499. * List.some -> Use Array.prototype.some directly
  500. * Object.bindMethods -> it was version that considered descriptors, we have now
  501. Object.prototype.bindMethods which operates only on enumerable properties
  502. * Object.every -> version that considered all properties, we have now
  503. Object.prototype.every which iterates only enumerables
  504. * Object.invoke -> no use case
  505. * Object.mergeDeep -> no use case
  506. * Object.pluck -> no use case
  507. * Object.same -> it considered descriptors, now there’s only Object.isDuplicate
  508. which compares only enumerable properties
  509. * Object.sameType -> no use case
  510. * Object.toDescriptor and Object.toDescriptors -> replaced by much nicer
  511. Object.descriptor functions
  512. * Object/plain/link -> no use case (it was used internally only by
  513. Object/plain/merge)
  514. * Object/plain/setTrue -> now easily configurable by more universal
  515. Object.getSet(true)
  516. * String.trimRightStr -> Eventually String.prototype.trimCommonRight will be
  517. added
  518. v0.6.3 -- 2011.12.12
  519. * Cleared npm warning for misnamed property in package.json
  520. v0.6.2 -- 2011.08.12
  521. * Calling String.indent without scope (global scope then) now treated as calling
  522. it with null scope, it allows more direct invocations when using default nest
  523. string: indent().call(str, nest)
  524. v0.6.1 -- 2011.08.08
  525. * Added TAD test suite to devDependencies, configured test commands.
  526. Tests can be run with 'make test' or 'npm test'
  527. v0.6.0 -- 2011.08.07
  528. New methods:
  529. * Array: clone, compact (in place)
  530. * Date: format, duration, clone, monthDaysCount, day.floor, month.floor,
  531. year.floor
  532. * Function: getApplyArg, , ncurry, rncurry, hold, cache, log
  533. * List: findSameStartLength, shiftSame, peek, isListObject
  534. * Number: pad
  535. * Object: sameType, toString, mapToArray, mergeDeep, toDescriptor,
  536. toDescriptors, invoke
  537. * String: startsWith, endsWith, indent, trimLeftStr, trimRightStr, pad, format
  538. Fixed:
  539. * Object.extend does now prototypal extend as exptected
  540. * Object.merge now tries to overwrite only configurable properties
  541. * Function.flip
  542. Improved:
  543. * Faster List.toArray
  544. * Better global retrieval
  545. * Functionalized all Function methods
  546. * Renamed bindApply and bindCall to applyBind and callBind
  547. * Removed Function.inherit (as it's unintuitive curry clone)
  548. * Straightforward logic in Function.k
  549. * Fixed naming of some tests files (letter case issue)
  550. * Renamed Function.saturate into Function.lock
  551. * String.dashToCamelCase digits support
  552. * Strings now considered as List objects
  553. * Improved List.compact
  554. * Concise logic for List.concat
  555. * Test wit TAD in clean ES5 context
  556. v0.5.1 -- 2011.07.11
  557. * Function's bindBind, bindCall and bindApply now more versatile
  558. v0.5.0 -- 2011.07.07
  559. * Removed Object.is and List.apply
  560. * Renamed Object.plain.is to Object.plain.isPlainObject (keep naming convention
  561. consistent)
  562. * Improved documentation
  563. v0.4.0 -- 2011.07.05
  564. * Take most functions on Object to Object.plain to keep them away from object
  565. descriptors
  566. * Object functions with ES5 standard in mind (object descriptors)
  567. v0.3.0 -- 2011.06.24
  568. * New functions
  569. * Consistent file naming (dash instead of camelCase)
  570. v0.2.1 -- 2011.05.28
  571. * Renamed Functions.K and Function.S to to lowercase versions (use consistent
  572. naming)
  573. v0.2.0 -- 2011.05.28
  574. * Renamed Array folder to List (as its generic functions for array-like objects)
  575. * Added Makefile
  576. * Added various functions
  577. v0.1.0 -- 2011.05.24
  578. * Initial version