You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CHANGES 27KB

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