Ben Ogle
b54deccfae
String type must be strict.
...
It makes sense to coerce from more general -> more specific data types.
eg. string -> int, etc. But coercing the other way is problematic
in the case of chaining because the more general type will swallow the
specific type. eg. Setting `false` on type: [‘string’, ‘boolean’] will
coerce the boolean to a string, and will never allow the value to be
a boolean.
2014-09-29 16:09:49 -07:00
Ben Ogle
9808264b7f
Fix onDidChange usage
2014-09-29 16:09:49 -07:00
Ben Ogle
f3ed3dc357
Fix doc to match implementation
2014-09-29 16:09:49 -07:00
Ben Ogle
33b25c7312
Use new config callback arguments
2014-09-29 16:09:49 -07:00
Ben Ogle
454f9c4c65
Rename config-defaults -> config-schema
2014-09-29 16:09:49 -07:00
Ben Ogle
1b506673bb
📝 update
2014-09-29 16:09:49 -07:00
Ben Ogle
5651ebbb48
always set, only emit when values differ
2014-09-29 16:09:49 -07:00
Ben Ogle
a7185a894f
Fix specs
2014-09-29 16:09:49 -07:00
Ben Ogle
16c7fd3d70
Add spec for update event on load
2014-09-29 16:09:49 -07:00
Ben Ogle
98290b31ab
Rework defaults and user loading to notify per path
2014-09-29 16:09:48 -07:00
Ben Ogle
08b138997d
Change the onDidChange / observe arguments
...
Support passing no keypath
2014-09-29 16:09:48 -07:00
Ben Ogle
1f7aee00ac
function names to the imperative mood
...
http://en.wikipedia.org/wiki/Imperative_mood
2014-09-29 16:09:48 -07:00
Ben Ogle
3977596084
Validators -> enforcers
2014-09-29 16:09:48 -07:00
Ben Ogle
804d0d9911
Doc 💄
2014-09-29 16:09:48 -07:00
Ben Ogle
04d045227a
rename to config-defaults
2014-09-29 16:09:48 -07:00
Ben Ogle
4e1d13ceea
is plain object
2014-09-29 16:09:48 -07:00
Ben Ogle
ef19e925e9
Strings accept numbers too
2014-09-29 16:09:48 -07:00
Ben Ogle
2c1fa19e27
Update spec strings
2014-09-29 16:09:48 -07:00
Ben Ogle
11fad1bd12
Moar 📝
2014-09-29 16:09:48 -07:00
Ben Ogle
1408d69641
Fix up message strings
2014-09-29 16:09:48 -07:00
Ben Ogle
38d2303857
Clean up docs in creating a package
2014-09-29 16:09:48 -07:00
Ben Ogle
96207ffbdb
Update error messages to read good
2014-09-29 16:09:47 -07:00
Ben Ogle
fcf2143e70
isPlainObject
2014-09-29 16:09:47 -07:00
Ben Ogle
3a8f842de3
Remove uses of toggle
2014-09-29 16:09:47 -07:00
Ben Ogle
452e34db90
Remove deprecations for push / remove / unshift at keypath
2014-09-29 16:09:47 -07:00
Ben Ogle
8b39ce77b1
We’ll always have validators for a type. No check
2014-09-29 16:09:47 -07:00
Ben Ogle
604158647a
line height can be a string or a number
2014-09-29 16:09:47 -07:00
Ben Ogle
22fb5adda9
Remove deprecated calls for config.observe .. callNow: false in core
2014-09-29 16:09:47 -07:00
Ben Ogle
e607d45f0d
Remove instances of getPositiveInt()
2014-09-29 16:09:47 -07:00
Ben Ogle
94d470002b
Update doc strings
2014-09-29 16:09:47 -07:00
Ben Ogle
33d4ace8e9
📝 more docs for Config
2014-09-29 16:09:47 -07:00
Ben Ogle
800dee09ba
Make boolean schema validator a little tighter
2014-09-29 16:09:47 -07:00
Ben Ogle
6b4ce902ba
Undefined in Config::set always unsets the value
2014-09-29 16:09:46 -07:00
Ben Ogle
c6f7c75c8a
Update method doc strings for clarity
2014-09-29 16:09:46 -07:00
Ben Ogle
cb1f8e02aa
Return the value from restoreDefault
2014-09-29 16:09:46 -07:00
Ben Ogle
885a19492c
Rearrange managing settings section
2014-09-29 16:09:46 -07:00
Ben Ogle
8f738aae53
Fix up Config doc string
2014-09-29 16:09:46 -07:00
Ben Ogle
f09e58b434
Update config docs
2014-09-29 16:09:46 -07:00
Ben Ogle
98e828b337
Move default schema into config-default-schema.coffee
2014-09-29 16:09:46 -07:00
Ben Ogle
03a9a67ba8
Move spec
2014-09-29 16:08:04 -07:00
Ben Ogle
beb96cc025
💄
2014-09-29 16:08:04 -07:00
Ben Ogle
ae76bd6c96
Do not allow infinity in number types
2014-09-29 16:08:04 -07:00
Ben Ogle
694dd05e7b
Make warn messages way better.
2014-09-29 16:08:04 -07:00
Ben Ogle
662fc443dc
Fix specs
2014-09-29 16:08:04 -07:00
Ben Ogle
0fc773c1fc
Warn when loading bogus values from the user's config
2014-09-29 16:08:03 -07:00
Ben Ogle
aa5b0ce41f
Remove linter errors, warn when bad value
2014-09-29 16:08:03 -07:00
Ben Ogle
832b4ae4d8
Fix specs
2014-09-29 16:08:03 -07:00
Ben Ogle
af1bdaf901
Dont fail when there are thigns to set with array and object types
2014-09-29 16:08:03 -07:00
Ben Ogle
969ca048e8
Fix specs
2014-09-29 16:08:03 -07:00
Ben Ogle
0d2fdec326
Fix specs in config
2014-09-29 16:08:03 -07:00