mirror of
				https://github.com/flynx/features.js.git
				synced 2025-10-30 19:00:10 +00:00 
			
		
		
		
	working on docs..
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									92ff8fd4dc
								
							
						
					
					
						commit
						b245275733
					
				
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							| @ -12,15 +12,12 @@ The Feature / Action couple is meta-programming library that helps with: | |||||||
| Actions are an extension to the JavaScript object model tailored for | Actions are an extension to the JavaScript object model tailored for | ||||||
| a set of specific tasks. | a set of specific tasks. | ||||||
| 
 | 
 | ||||||
| 
 | By design this tool-set promotes a _cooperative_ model and makes it | ||||||
| #### Goals: | hard to change/modify existing signatures / _contracts_ in _extending_  | ||||||
| - Provide a unified mechanism to define and manage user API's for  | code. | ||||||
|   use in UI-hooks, keyboard mappings, scripting, ... etc. |  | ||||||
| - A means to generate configuration UI's |  | ||||||
| - A means to generate documentation |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #### Functionality: | ### Functionality: | ||||||
| - **Call _extended_ actions automatically**   | - **Call _extended_ actions automatically**   | ||||||
|   All actions (methods) in a chain are guaranteed to get called if the  |   All actions (methods) in a chain are guaranteed to get called if the  | ||||||
|   action is called. |   action is called. | ||||||
| @ -30,11 +27,12 @@ a set of specific tasks. | |||||||
| - **Thread the return value down the call chain**   | - **Thread the return value down the call chain**   | ||||||
|   The return value will get passed through all the actions in a chain  |   The return value will get passed through all the actions in a chain  | ||||||
|   before returning to the action caller. |   before returning to the action caller. | ||||||
|  | - **Organise and apply actions to objects** | ||||||
| - **Unified way to document actions** | - **Unified way to document actions** | ||||||
| - **Introspection and inspection API** | - **Introspection and inspection API** | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #### Restrictions: | ### Restrictions comparing to native JavaScript: | ||||||
| - **No method shadowing**   | - **No method shadowing**   | ||||||
|   The _extending_ action can not "shadow" the _extended_ action in a  |   The _extending_ action can not "shadow" the _extended_ action in a  | ||||||
|   non destructive manner (e.g. via a `throw`), all actions in a chain are  |   non destructive manner (e.g. via a `throw`), all actions in a chain are  | ||||||
| @ -52,9 +50,6 @@ a set of specific tasks. | |||||||
|   _extending_ actions are ignored |   _extending_ actions are ignored | ||||||
| - **Return `this` by default** | - **Return `this` by default** | ||||||
| 
 | 
 | ||||||
| By design this tool-set promotes a _cooperative_ design and makes it |  | ||||||
| hard to change/modify existing signatures / _contracts_ in _extending_  |  | ||||||
| code. |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -127,7 +122,7 @@ Root Action                             o---|---x | |||||||
|   <action-set>.getDoc(<action-name>[, ..]) |   <action-set>.getDoc(<action-name>[, ..]) | ||||||
|       -> dict of action-name, doc |       -> dict of action-name, doc | ||||||
| 
 | 
 | ||||||
|   <action-set>.a.getHandlerDocStr(<action-name>) |   <action-set>.getHandlerDocStr(<action-name>) | ||||||
|       -> formated string of action handlers |       -> formated string of action handlers | ||||||
| 
 | 
 | ||||||
|   <action-set>.actions |   <action-set>.actions | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user