Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atmajs/utils
https://github.com/atmajs/utils
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/atmajs/utils
- Owner: atmajs
- Created: 2014-09-25T00:38:49.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T22:54:51.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T22:12:07.615Z (7 months ago)
- Language: JavaScript
- Size: 987 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Util Functions
----[![Build Status](https://app.travis-ci.com/atmajs/utils.svg?branch=master)](https://app.travis-ci.com/github/atmajs/utils)
#### Embeddable
- `lib/utils.embed.js` All functions are in the top-level scope.
#### Module
- All functions are wrapped to an object, e.g. `require('atma-utils').obj_getProperty` or `import { obj_getProperty } from 'atma-utils'`
## Functions
- Object
- `obj_getProperty(obj, path)`
- `obj_setProperty(obj, path, val)`
- `obj_extend(a, b)`
- `obj_extendMany(a, [ ...args])`
- `obj_create(obj)`
- Array
- `arr_remove`
- Function
- `fn_proxy(fn, ctx)`
- `fn_doNothing`
- is
- `is_Function(x)`
- `is_String(x)`
- `is_notEmptyString(x)`
- `is_Array(x)`
- `is_ArrayLike(x)`
- `is_Object(x)`
- `is_rawObject(x)`- class
- `class_create([...Base:Function|Object], Proto:Object)````javascript
Proto := Object {
constructor: Function,
...
}
```- `class_createEx`
Similar to `class_create` but also handles the property accessors. The `class_create` is in this way much more simple and has better performance.
- `class_Dfr`
Promise
- `class_EventEmitter`
Event Emitter
- error
- `error_createClass(name:String, Proto:Object):Function`
- `error_formatSource(source:String, index:Number, ?filename:String):String`
- `error_cursor(source:String, index:Number):Array`
- `error_formatCursor(lines:Array, lineNum: Number, rowNum: Number):String`- Prototype fn references
- `_Array_slice`
- `_Array_splice`
- `_Array_indexOf`
- `_Obj_hasOwnProp_`# Build
```bash
$ npm install
$ npm run build
```# Release
- Bump
- Builds
- Commit `release` branch
- Push/Pulblish:
- to `git`
- to `npm````bash
$ npm install
$ npm run release
```# Test
```bash
$ npm install
$ npm test
```----
:copyright: 2021 - MIT - Atma.js