Ruby-like methods for JavaScript.
npm install buryjs!npm

!code size
!npm

v0.6
_Ruby-like methods for JavaScript._
Bury.js extends the prototype of native JS objects such as String, Number and Array.
- 💡 Examples
- View on GitHub
- View on npm
``js`
[3, 3, 4, null].compact.uniq.sum // => 7
[1, 2, 3, 4].append(5).last // => 5
`js`
"Hello!".upcase.chop.reverse // => "OLLEH"
"Bury.js".gsub(/\./, '').size // => 6
`js`
3.5.floor.next // => 4
3..times(n => alert(n)) // => Try it out!
`sh`
npm i buryjsor
yarn add buryjs
`js
import Bury from 'buryjs';
Bury.init(options);
`
If not specified, the options will be set as follows:
`js`
options = {
configurable: true,
enumerable: false
};
You can also use the Bury methods only for a specific type of prototype by specifying an array for 'options.only' as follows:
`js``
Bury.init({
only: [Array, String]
});
---
> Note: All of Bury's destructive methods will be changed to non-destructive methods in a future version.